本文整理汇总了C#中execSQL.connectionClass类的典型用法代码示例。如果您正苦于以下问题:C# execSQL.connectionClass类的具体用法?C# execSQL.connectionClass怎么用?C# execSQL.connectionClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
execSQL.connectionClass类属于命名空间,在下文中一共展示了execSQL.connectionClass类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ddDonVi_SelectedIndexChanged
protected void ddDonVi_SelectedIndexChanged(object sender, EventArgs e)
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string cmd = string.Format("EXEC ChungNT.BC_getUsers '{0}'", ddDonVi.SelectedValue);
ddNguoiNhan.DataSource = ob.fillDataset(cmd).Tables[0];
ddNguoiNhan.DataBind();
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:7,代码来源:BaoCao_Gui.ascx.cs
示例2: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
hlQuayLai.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(TabId);
if (UserInfo.IsInRole("Administrators") || UserInfo.IsInRole("Admin_DonVi"))
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset("EXEC ChungNT.Password_Admin");
string tab = ds.Tables[1].Rows[0]["TabID"].ToString();
string module = ds.Tables[1].Rows[0]["ModuleID"].ToString();
DataColumn dc = new DataColumn("Link");
ds.Tables[0].Columns.Add(dc);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["Link"] = DotNetNuke.Common.Globals.NavigateURL(int.Parse(tab), "Edit", "mid/" + module, "UserId/" + dr["UserID"].ToString());
dr.EndEdit();
}
gvNhanVien.DataSource = ds.Tables[0];
gvNhanVien.DataBind();
int d = 0;
foreach (GridViewRow dr in gvNhanVien.Rows)
{
dr.CssClass = dr.Cells[6].Text;
if (dr.Cells[6].Text != "OK") d++;
}
lbError.Text = string.Format("Mật khẩu quá hạn: <b>{0}</b> / {1} tài khoản", d, gvNhanVien.Rows.Count);
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message; }
else Response.Redirect(DotNetNuke.Common.Globals.NavigateURL(TabId));
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:33,代码来源:Password_Admin.ascx.cs
示例3: btChuyen_Click
protected void btChuyen_Click(object sender, EventArgs e)
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds;
CheckBox cb;
string cmd;
int ok = 0;
foreach (GridViewRow row in gvKeHoach.Rows)
{
cb = (CheckBox)row.FindControl("cbSelect");
if (cb.Checked)
try
{
cmd = string.Format("EXEC ChungNT.KeHoach_ChuyenTiep_Update {0}, {1}, '{2}', {3}", row.Cells[1].Text, rbKeHoach.SelectedValue, ob.dateFormat(tbTime.Text), UserId);
ds = ob.fillDataset(cmd);
if (ds.Tables[0].Rows[0][0].ToString() == "1")
ok++;
}
catch { }
}
gvKeHoach.DataSource = null;
gvKeHoach.DataBind();
lbError.Text = string.Format("Chuyển tiếp thành công <b>{0}</b> kế hoạch", ok);
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình cập nhật. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:28,代码来源:Plan_Forward.ascx.cs
示例4: Load_Ke
private void Load_Ke()
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset("EXEC LuuTru.Ke_Select_2015 " + lbGiaID.Text);
DataColumn dc = new DataColumn("Link");
ds.Tables[0].Columns.Add(dc);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["Link"] = DotNetNuke.Common.Globals.NavigateURL(TabId, "CAP", "mid/" + ModuleId, "ID/" + dr[2].ToString());
dr.EndEdit();
}
gvCap.DataSource = ds.Tables[0];
gvCap.DataBind();
string last = "";
int last_i = 0, count = 0;
for (int i = 0; i < gvCap.Rows.Count; i++)
if (last == gvCap.Rows[i].Cells[1].Text)
count++;
else
{
//gvCap.Rows[last_i].Cells[1].RowSpan = count;
last = gvCap.Rows[i].Cells[1].Text;
last_i = i;
count = 1;
}
}
catch (Exception ex) { lbErrorGia.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:32,代码来源:LuuTru_Gia.ascx.cs
示例5: btCapNhat_Click
protected void btCapNhat_Click(object sender, EventArgs e)
{
if (fileUpload.HasFile) btDinhKem_Click(sender, e);
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string sql = string.Format("EXEC TrongTam.CongViec_Update 0, N'{0}', '{1}', '{2}', '{3}', '{4}', {5}",
tbTieuDe.Text, ob.dateFormat(tbBatDau.Text), ob.dateFormat(tbKetThuc.Text), ob.dateFormat(tbCanhBao.Text), lbChuTri.Text, UserId);
DataSet ds = ob.fillDataset(sql);
string newID = ds.Tables[0].Rows[0][1].ToString();
int trongSo;
TextBox txt_TrongSo, txt_BatDau, txt_KetThuc, txt_CanhBao, txt_NoiDung;
CheckBox cbPhanCong;
foreach (GridViewRow dr in gvPhanCong.Rows)
{
cbPhanCong = (CheckBox)dr.FindControl("cbPhanCong");
txt_BatDau = (TextBox)dr.FindControl("tbBatDau");
if (txt_BatDau.Text == "") txt_BatDau.Text = tbBatDau.Text;
txt_KetThuc = (TextBox)dr.FindControl("tbKetThuc");
if (txt_KetThuc.Text == "") txt_KetThuc.Text = tbKetThuc.Text;
txt_CanhBao = (TextBox)dr.FindControl("tbCanhBao");
if (txt_CanhBao.Text == "") txt_CanhBao.Text = txt_KetThuc.Text;
txt_NoiDung = (TextBox)dr.FindControl("tbNoiDung");
sql = string.Format("EXEC TrongTam.CongViec_PhanCong {0}, N'{1}', '{2}', '{3}', '{4}', {5}, {6}, '{7}'",
newID, txt_NoiDung.Text, ob.dateFormat(txt_BatDau.Text), ob.dateFormat(txt_KetThuc.Text), dr.Cells[0].Text, UserId,
cbPhanCong.Checked ? 3 : 0,
ob.dateFormat(txt_CanhBao.Text));
ob.fillDataset(sql);
}
Response.Redirect(hlQuayLai.NavigateUrl);
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình cập nhật. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:34,代码来源:CongViec_ThemMoi_TN.ascx.cs
示例6: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string sql = string.Format("EXEC ThongtinMHTB.dbo.Lay_Thongbao_tonghop_new '{0}', '{1}'", UserInfo.Username, UserInfo.Profile.GetPropertyValue("MaDonVi"));
DataSet ds = ob.fillDataset(sql);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["noidung"] = HttpUtility.HtmlDecode(dr["noidung"].ToString());
dr.EndEdit();
}
gvThongBao.DataSource = ds.Tables[0];
gvThongBao.DataBind();
DataView dv = ds.Tables[1].DefaultView;
GridView gvDinhKem;
foreach (GridViewRow dr in gvThongBao.Rows)
{
gvDinhKem = (GridView)dr.FindControl("gvDinhKem");
dv.RowFilter = "ma_tb = " + dr.Cells[0].Text;
gvDinhKem.DataSource = dv.Table;
gvDinhKem.DataBind();
}
}
catch { }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:29,代码来源:ThongBao_B1.ascx.cs
示例7: BindDuLieuDanhMucGia
private void BindDuLieuDanhMucGia()
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset("EXEC LuuTru.Ke_Select " + lbID.Text + ", 0");
lbID.Text = ds.Tables[0].Rows[0][2].ToString();
lbTieuDe.Text = ds.Tables[0].Rows[0][1].ToString();
lbMoTa.Text = ds.Tables[0].Rows[0][3].ToString();
DataColumn dc = new DataColumn("LinkID");
ds.Tables[0].Columns.Add(dc);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["LinkID"] = DotNetNuke.Common.Globals.NavigateURL(TabId, "KE", "mid/" + ModuleId, "ID/" + dr[4].ToString());
dr.EndEdit();
}
if (ds.Tables[0].Rows.Count == 0)
{
DataRow dr = ds.Tables[0].NewRow();
dr[4] = 0;
ds.Tables[0].Rows.Add(dr);
}
gvKho.DataSource = ds.Tables[0];
gvKho.DataBind();
gvKho.Columns[4].Visible = UserInfo.IsInRole("Administrators") || UserInfo.IsInRole("Admin_DonVi") || UserInfo.IsInRole("VANTHU") || UserInfo.IsInRole("NHANVIENLUUTRU");
lbError.Text = "Danh sách: " + ds.Tables[0].Rows.Count;
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:31,代码来源:DanhMuc_Ke.ascx.cs
示例8: show_phongban
private void show_phongban()
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset("EXEC ChungNT.KeHoach_TongHop_DonVi");
DataView dv = ds.Tables[0].DefaultView;
TreeNode child;
foreach (TreeNode node in tvPhongBan.Nodes)
{
dv.RowFilter = string.Format("GroupID = '{0}'", node.Value);
for (int i = 0; i < dv.Count; i++)
{
child = new TreeNode();
child.Value = dv[i][0].ToString();
child.Text = dv[i][1].ToString();
child.ShowCheckBox = true;
child.SelectAction = TreeNodeSelectAction.None;
node.ChildNodes.Add(child);
}
}
lbError.Text = "";
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:25,代码来源:Plan_TongHop.ascx.cs
示例9: gvLoaiCV_RowCommand
protected void gvLoaiCV_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "SUA")
{
int id = Convert.ToInt32(e.CommandArgument);
tbLoaiCV.Text = HttpUtility.HtmlDecode(gvLoaiCV.Rows[id].Cells[2].Text);
cbCV_Den.Checked = ((CheckBox)gvLoaiCV.Rows[id].FindControl("cbCVDen")).Checked;
lbID.Text = gvLoaiCV.Rows[id].Cells[0].Text;
btCapNhat.Text = "Cập nhật";
}
if (e.CommandName == "XOA")
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
int id = Convert.ToInt32(e.CommandArgument);
string sql = string.Format("EXEC ChungNT.cv_spDMLoaiCV_Edit {0}, '', 0, 1, {1}", gvLoaiCV.Rows[id].Cells[0].Text, UserId);
DataSet ds = ob.fillDataset(sql);
if (ds.Tables[0].Rows[0][0].ToString() == "1")
{
Load_Data();
lbError.Text = "Xóa thành công";
}
else lbError.Text = "Không thể xóa dữ liệu";
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình xóa dữ liệu. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:26,代码来源:DM_LoaiCV.ascx.cs
示例10: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
if (UserId < 0) Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("Login"));
txtNgayBatKy.Text = DateTime.Today.ToString("dd/MM/yyyy");
lbDonVi.Text = "F01";
try
{
lbDonVi.Text = UserInfo.Profile.City.ToString();
}
catch { }
btQuayLai.Enabled = lbDonVi.Text.Length == 6;
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string cmd = string.Format("EXEC [BaoCao].[DonVi_Select] '{0}'", lbDonVi.Text);
lbTenDonVi.Text = ob.fillDataset(cmd).Tables[0].Rows[0][1].ToString();
btnKiemTraDuLieuTuan_Click(sender, e);
}
catch (Exception ex)
{
lbMessage.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message;
lbMessage2.Text = lbMessage.Text;
}
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:28,代码来源:BCTuan_LapBC_DV.ascx.cs
示例11: load_data
private void load_data()
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string cmd = string.Format("EXEC BCPLAN_APR_ThongKe {0}, {1}", rbWeek.SelectedValue, rbTime.SelectedValue);
DataSet ds = ob.fillDataset(cmd);
dlThongKe.DataSource = ds.Tables[0];
dlThongKe.DataBind();
DataView dv = ds.Tables[1].DefaultView;
Label lbThoiGian, lbDonVi, lbDem;
int dem;
foreach (DataListItem dr in dlThongKe.Items)
{
lbThoiGian = (Label)dr.FindControl("lbThoiGian");
dv.RowFilter = string.Format("NgayThang = '{0}'", lbThoiGian.Text);
lbDonVi = (Label)dr.FindControl("lbDonVi");
dem = 0;
foreach (DataRow row in dv.ToTable().Rows)
{
dem++;
lbDonVi.Text += row[2].ToString() + "; ";
}
lbDem = (Label)dr.FindControl("lbDem");
lbDem.Text = dem.ToString();
}
}
catch { }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:29,代码来源:APR_ThongKe.ascx.cs
示例12: bindData
protected void bindData()
{
if (lbKey.Text == "0") blank();
else try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string cmdTxt = string.Format("exec bcPlan_getItem @id={0}, @userID={1}", lbKey.Text, UserId);
DataSet ds = ob.fillDataset(cmdTxt);
//lbKey.Text = ds.Tables[0].Rows[0][0].ToString();
lbThangNam.Text = ds.Tables[0].Rows[0][1].ToString();
tbSapXep.Text = ds.Tables[0].Rows[0][3].ToString();
tbTT.Text = ds.Tables[0].Rows[0][4].ToString();
tbNoiDung.Text = ds.Tables[0].Rows[0][5].ToString();
tbDV.Text = ds.Tables[0].Rows[0][6].ToString();
tbKeHoach.Text = ds.Tables[0].Rows[0][7].ToString();
tbThucHien.Text = ds.Tables[0].Rows[0][8].ToString();
tbLuyKe.Text = ds.Tables[0].Rows[0][9].ToString();
tbChuTri.Text = ds.Tables[0].Rows[0][10].ToString();
tbDanhGia.Text = ds.Tables[0].Rows[0][11].ToString();
tbNhanXet.Text = ds.Tables[0].Rows[0][12].ToString();
lbModify.Text = string.Format("Cập nhật thông tin : {0}", ds.Tables[0].Rows[0][13].ToString());
lbNhanXet.Text = string.Format("Tự đánh giá : {0}", ds.Tables[0].Rows[0][15].ToString());
}
catch (Exception ex)
{
blank();
lbError.Text = "Không thể cập nhật kế hoạch này. " + ex.Message;
}
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:29,代码来源:plan_edit.ascx.cs
示例13: treeView_SelectedNodeChanged
protected void treeView_SelectedNodeChanged(object sender, EventArgs e)
{
lbLoaiBC.Text = treeView.SelectedNode.Text;
gvBaoCao.DataSource = null;
gvBaoCao.DataBind();
if (treeView.SelectedNode.Depth > 0)
try
{
string cmdTxt = string.Format("exec DA_BC_getListBC {0}, {1}", treeView.SelectedNode.Parent.Value, treeView.SelectedNode.Value);
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset(cmdTxt);
DataColumn dc = new DataColumn("ViewLink");
ds.Tables[0].Columns.Add(dc);
dc = new DataColumn("LinkDV");
ds.Tables[0].Columns.Add(dc);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["ViewLink"] = DotNetNuke.Common.Globals.NavigateURL(TabId, "BAOCAO", "mid/" + ModuleId, "ID/" + dr[0].ToString());
if (dr[5].ToString().Length > 0)
dr["LinkDV"] = DotNetNuke.Common.Globals.NavigateURL(TabId, "DUAN", "mid/" + ModuleId, "ID/" + dr[0].ToString(), "DV/" + dr[5].ToString());
dr.EndEdit();
}
gvBaoCao.DataSource = ds;
gvBaoCao.DataBind();
}
catch { }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:29,代码来源:CNT_BAOCAO_LIST.ascx.cs
示例14: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
if (UserId < 0) Response.Redirect(DotNetNuke.Common.Globals.NavigateURL("Login"));
hlChamDiem_Ban.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(TabId, "BAN", "mid/" + ModuleId);
hlDuyetTB.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(TabId, "DUYET", "mid/" + ModuleId);
hlPhucTra.NavigateUrl = DotNetNuke.Common.Globals.NavigateURL(TabId, "PHUCTRA", "mid/" + ModuleId);
execSQL.connectionClass ob = new execSQL.connectionClass();
try
{
string sql = string.Format("SELECT VHDN.Quyen_CheckUser(2, {0})", UserId);
DataSet ds = ob.fillDataset(sql);
hlChamDiem_Ban.Visible = ds.Tables[0].Rows[0][0].ToString() == "1";
hlDuyetTB.Visible = ds.Tables[0].Rows[0][0].ToString() == "1";
sql = string.Format("SELECT VHDN.Quyen_CheckUser(1, {0})", UserId);
ds = ob.fillDataset(sql);
hlChamDiem_Ban.Visible = ds.Tables[0].Rows[0][0].ToString() == "1";
hlPhucTra.Visible = ds.Tables[0].Rows[0][0].ToString() == "1";
}
catch { }
tbThoiGian.Text = DateTime.Today.ToString("dd/MM/yyyy");
lbThoiGian.Text = ob.dateFormat(tbThoiGian.Text);
Load_Data();
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:27,代码来源:VHDN_2016.ascx.cs
示例15: Load_Data
private void Load_Data()
{
try
{
string sql = string.Format("EXEC VHDN.BangDiem_Select_CaNhan 1, {0}, '{1}'", Request["ID"], Request["DT"]);
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset(sql);
gvData.DataSource = ds.Tables[0];
gvData.DataBind();
int diemC, diem, diemTB, diemPT;
diemC = 0; diem = 0; diemTB = 0; diemPT = 0;
foreach (DataRow dr in ds.Tables[0].Rows)
try
{
diemC += int.Parse(dr["DiemChuan"].ToString());
diem += int.Parse(dr["Diem"].ToString());
diemTB += int.Parse(dr["DiemTB"].ToString());
diemPT += int.Parse(dr["DiemPT"].ToString());
}
catch { }
gvData.FooterRow.CssClass = "group";
gvData.FooterRow.Cells[1].Text = "Tổng cộng :";
gvData.FooterRow.Cells[2].Text = diemC.ToString();
gvData.FooterRow.Cells[3].Text = diem.ToString();
gvData.FooterRow.Cells[4].Text = diemTB.ToString();
gvData.FooterRow.Cells[5].Text = diemPT.ToString();
sql = string.Format("EXEC VHDN.TongHop_TieuDe {0}, '{1}'", Request["ID"], Request["DT"]);
ds = ob.fillDataset(sql);
lbThang.Text = ds.Tables[0].Rows[0][0].ToString();
lbBan.Text = ds.Tables[1].Rows[0][0].ToString();
}
catch { }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:35,代码来源:VHDN_2016_Ban_Print.aspx.cs
示例16: fileCreate
private void fileCreate()
{
try
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string sql = string.Format("EXEC ChungNT.cv_spFiles_ByPrimaryKey {0}, {1}", Request["id"], Request["cv"]);
DataSet ds = ob.fillDataset(sql);
string fID = ds.Tables[0].Rows[0]["FileID"].ToString();
string fName = ds.Tables[0].Rows[0]["FileName"].ToString();
string fType = ds.Tables[0].Rows[0]["FileType"].ToString();
string fSize = ds.Tables[0].Rows[0]["FileSize"].ToString();
byte[] fData = (byte[])ds.Tables[0].Rows[0]["FileData"];
string folder = "0";
if (fID.Length > 2) folder = fID.Substring(0, fID.Length - 2);
string filePath = Server.MapPath("") + "\\" + folder;
if (!Directory.Exists(filePath)) Directory.CreateDirectory(filePath);
int last = fName.LastIndexOf(".");
string fileName = fID + fName.Substring(last, fName.Length - last);
filePath = filePath + @"\" + fileName;
if (!File.Exists(filePath)) File.WriteAllBytes(filePath, fData);
string iframe = string.Format("<iframe src=\"http://docs.google.com/gview?url=http://eoffice.npc.com.vn{0}/DesktopModules/CongVan_CNT/{1}/{2}&embedded=true\" style=\"width:100%; height:100%;\" frameborder=\"0\"></iframe>",
Request.ApplicationPath, folder, fileName);
iGoogle.InnerHtml = iframe;
}
catch (Exception ex) { Response.Write("Không thể tải văn bản này. " + ex.Message); }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:28,代码来源:CV_ViewFile_Google.aspx.cs
示例17: Load_Data
private void Load_Data()
{
execSQL.connectionClass ob = new execSQL.connectionClass();
lbNgayThang.Text = ob.dateFormat(tbNgayThang.Text);
try
{
string cmd = string.Format("EXEC ChamCong.Reason_Select '{0}', {1}, '{2}'", lbMaDV.Text, dlNhanVien.SelectedValue, lbNgayThang.Text);
gvChamCong.DataSource = ob.fillDataset(cmd).Tables[0];
gvChamCong.DataBind();
DataSet ds = ob.fillDataset("ChamCong.Type_Select");
DropDownList dlLoai;
foreach (GridViewRow dr in gvChamCong.Rows)
{
dlLoai = (DropDownList)dr.FindControl("dlLoai");
dlLoai.DataSource = ds.Tables[0];
dlLoai.DataBind();
try
{
dlLoai.SelectedValue = dr.Cells[2].Text;
}
catch { }
dr.CssClass = dr.Cells[1].Text;
}
}
catch (Exception ex) { lbError.Text = "Có lỗi trong quá trình đọc dữ liệu. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:26,代码来源:Reason.ascx.cs
示例18: gvLoai_RowCommand
protected void gvLoai_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "XEM")
try
{
int index = Convert.ToInt32(e.CommandArgument);
string cmd = string.Format("EXEC ChungNT.BaoCao_Home_BaoCao {0}, {1}", gvLoai.Rows[index].Cells[1].Text, gvLoai.Rows[index].Cells[3].Text);
execSQL.connectionClass ob = new execSQL.connectionClass();
DataSet ds = ob.fillDataset(cmd);
DataColumn dc = new DataColumn("ViewLink");
ds.Tables[0].Columns.Add(dc);
ds.Tables[0].AcceptChanges();
foreach (DataRow dr in ds.Tables[0].Rows)
{
dr.BeginEdit();
dr["ViewLink"] = DotNetNuke.Common.Globals.NavigateURL(TabId, "BAOCAO", "mid/" + ModuleId, "ID/" + dr[0].ToString());
dr.EndEdit();
}
gvBaoCao.DataSource = ds.Tables[0];
gvBaoCao.DataBind();
lbLoai.Text = ds.Tables[1].Rows[0][0].ToString();
Panel1.Visible = true;
gvLoai.Visible = false;
lbError.Text = "";
}
catch (Exception ex) { lbError.Text = "Có lỗi xảy ra trong quá trình đọc báo cáo. " + ex.Message; }
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:28,代码来源:BaoCao_Home.ascx.cs
示例19: Page_Load
protected void Page_Load(object sender, EventArgs e)
{
if (IsPostBack) return;
execSQL.connectionClass ob = new execSQL.connectionClass();
GridView1.DataSource = ob.fillDataset("EXEC bcPlan_getPhanQuyen " + UserId);
GridView1.DataBind();
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:7,代码来源:plan_role.ascx.cs
示例20: btCapNhat_Click
protected void btCapNhat_Click(object sender, EventArgs e)
{
execSQL.connectionClass ob = new execSQL.connectionClass();
string dienap, dieu1, dieu2, dieu3, dieu5, dieu14, bienphap;
foreach (GridViewRow row in gvGiamThieu.Rows)
try
{
dienap = row.Cells[1].Text.Replace(" kV", "");
dieu1 = ((TextBox)row.FindControl("tbDieu1")).Text;
dieu2 = ((TextBox)row.FindControl("tbDieu2")).Text;
dieu3 = ((TextBox)row.FindControl("tbDieu3")).Text;
dieu5 = ((TextBox)row.FindControl("tbDieu5")).Text;
dieu14 = ((TextBox)row.FindControl("tbDieu14")).Text;
bienphap = ((TextBox)row.FindControl("tbBienPhap")).Text;
try { int.Parse(dieu1); }
catch { dieu1 = "0"; }
try { int.Parse(dieu2); }
catch { dieu2 = "0"; }
try { int.Parse(dieu3); }
catch { dieu3 = "0"; }
try { int.Parse(dieu5); }
catch { dieu5 = "0"; }
try { int.Parse(dieu14); }
catch { dieu14 = "0"; }
string cmd = string.Format("EXEC LichLV.HanhLang_GiamThieu_Update '{9}', '{0}', {1}, {2}, {3}, {4}, {5}, {6}, N'{7}', 1, {8}",
lbThoiGian.Text, dienap, dieu1, dieu2, dieu3, dieu5, dieu14, bienphap, UserId, lbDonVi.Text);
ob.fillDataset(cmd);
}
catch { }
Load_GiamThieu();
lbError.Text = "Cập nhật lúc " + DateTime.Now.ToString("HH:mm dd/MM");
}
开发者ID:chungnt88,项目名称:DesktopModules,代码行数:33,代码来源:HanhLang_GiamThieu_Nhap2.ascx.cs
注:本文中的execSQL.connectionClass类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论