本文整理汇总了C#中execSQL.connectionClass类的典型用法代码示例。如果您正苦于以下问题:C# execSQL.connectionClass类的具体用法?C# execSQL.connectionClass怎么用?C# execSQL.connectionClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
execSQL.connectionClass类属于命名空间,在下文中一共展示了execSQL.connectionClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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();
}
示例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));
}
示例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; }
}
示例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; }
}
示例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; }
}
示例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 { }
}
示例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; }
}
示例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; }
}
示例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; }
}
示例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;
}
}
示例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 { }
}
示例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;
}
}
示例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 { }
}
示例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();
}
示例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 { }
}