private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); var lstDD = db.DM_DiemDos.Where(x => x.IDMaDViQly == ma_dviqly).ToList(); cmbDiemDo.DataSource = lstDD; cmbDiemDo.ValueField = "IDDiemDo"; cmbDiemDo.TextField = "TenDiemDo"; cmbDiemDo.DataBind(); // var lstLo = db.DM_Los.Where(x => x.IDMaDViQly == ma_dviqly).ToList(); var lstDMTinhChat = db.DM_TinhChatKenhs.ToList(); cmbTinhChatGiao.DataSource = lstDMTinhChat; cmbTinhChatGiao.ValueField = "ID"; cmbTinhChatGiao.TextField = "TinhChat"; cmbTinhChatGiao.DataBind(); cmbTinhChatNhan.DataSource = lstDMTinhChat; cmbTinhChatNhan.ValueField = "ID"; cmbTinhChatNhan.TextField = "TinhChat"; cmbTinhChatNhan.DataBind(); }
protected void btnCapNhat_Click(object sender, EventArgs e) { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); SYS_Session session = (SYS_Session)Session["SYS_Session"]; string strTenFile = fileUp.FileName; UploadFile(); if (Session["Add"] + "" == "0") { var qtCT = (DataRowView)grdDVT.GetRow(grdDVT.FocusedRowIndex); //CBDN.DM_LoaiDay cn = db.DM_LoaiDays.SingleOrDefault(x => x.ID == qtCT.ID); if (!CheckName(txtMaTram.Text)) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", "alert('Mã trạm đã trùng');", true); return; } db.UPDATE_TTTT_QUANLYCAD_MATRAM(session.User.ma_dviqlyDN, txtMaTram.Text, strTenFile); } else { if (!CheckName(txtMaTram.Text)) { ScriptManager.RegisterStartupScript(Page, Page.GetType(), "", "alert('Mã trạm đã trùng');", true); return; } db.INSERT_TTTT_QUANLYCAD(session.User.ma_dviqlyDN, txtMaTram.Text, strTenFile); } pcAddRoles.ShowOnPageLoad = false; _DataBind(); }
private void LoadDataDV() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int a = int.Parse(session.User.ma_dviqly + ""); if (MaDienLuc.Value + "" != "") { if (a > 38) { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(a); List <DM_DS> List = new List <DM_DS>(); DM_DS Dvi = new DM_DS(); Dvi.MA_DVIQLY = session.User.ma_dviqlyDN + ""; Dvi.NAME_DVIQLY = donvi.NAME_DVIQLY.Split('-')[1].ToString().ToUpper(); List.Add(Dvi); cmMaDvi.DataSource = List; cmMaDvi.TextField = "NAME_DVIQLY"; cmMaDvi.ValueField = "MA_DVIQLY"; cmMaDvi.DataBind(); } else { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); // DataTable lst_dmdv = new DataTable(); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(int.Parse(MaDienLuc.Value + "")); cmMaDvi.DataSource = lst_dmdv; cmMaDvi.ValueField = "MA_DVIQLY"; cmMaDvi.TextField = "NAME_DVIQLY"; cmMaDvi.DataBind(); } } }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); DataTable lst_dmdv = new DataTable(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); if (donvi.ParentId == 0 || donvi.ParentId == 61) { lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(ma_dviqly); cmbMaDonVi.DataSource = lst_dmdv; cmbMaDonVi.ValueField = "IDMA_DVIQLY"; cmbMaDonVi.TextField = "NAME_DVIQLY"; cmbMaDonVi.DataBind(); } else { List <Entity.DM_DVQLY> lst = new List <DM_DVQLY>(); lst.Add(donvi); cmbMaDonVi.DataSource = lst; cmbMaDonVi.ValueField = "IDMA_DVIQLY"; cmbMaDonVi.TextField = "NAME_DVIQLY"; cmbMaDonVi.DataBind(); } }
private void InTongHopDienNang() { if (cmbPhuongThuc.Value == null || cmbPhuongThuc.Value + "" == "0") { return; } MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); // if (Request["XacNhan"] + "" == "1") kiemtra = true; var cn = db.DM_ChiNhanhs.SingleOrDefault(x => x.ID == int.Parse(cmbPhuongThuc.Value + "")); CBDN.DM_DVQLY giao, nhan; if (cn.IDMADVIQLY.Contains(",2,")) { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == 2); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == int.Parse(cn.IDMADVIQLY.Replace(",2,", "").Replace(",", ""))); } else { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemDauNguon); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemCuoiNguon); } MTCSYT.Report.InBieuTong report = new MTCSYT.Report.InBieuTong(int.Parse(cmbPhuongThuc.Value + ""), ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), "", "", donvi.TEN_DVIQLY, giao.TEN_DVIQLY, nhan.TEN_DVIQLY, 0, "", "", "", ""); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void InTongHopKHDAThap() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); var lst = db.TT_KhachHangDAThapTrongThang(int.Parse(session.User.ma_dviqly + ""), int.Parse("" + Request["Thang"]), int.Parse("" + Request["Nam"])).ToList(); DataTable dt = new DataTable(); dt.Columns.Add("STT"); dt.Columns.Add("TenDonVi"); dt.Columns.Add("SOKH"); dt.Columns.Add("KH160", typeof(decimal)); dt.Columns.Add("KH180", typeof(decimal)); dt.Columns.Add("KH200", typeof(decimal)); dt.Columns.Add("GiaiPhap"); dt.Columns.Add("TienDo"); int stt = 1; foreach (var chitiet in lst) { dt.Rows.Add(stt, chitiet.TEN_DVIQLY, chitiet.SoTBA, chitiet.KH160, chitiet.KH180, chitiet.KH200, chitiet.GiaiPhap, chitiet.TienDoThucHien); stt++; } MTCSYT.Report.KHDAThap report = new MTCSYT.Report.KHDAThap(dt, "" + Request["Thang"], "" + Request["Nam"], donvi.TEN_DVIQLY); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void InTongHopDienNang() { if (cmbPhuongThuc.Value == null) { return; } MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); // if (Request["XacNhan"] + "" == "1") kiemtra = true; string strGiao, strNhan; string strGDNhan = "", strGDGiao = ""; if (cmbPhuongThuc.Value + "" != "0") { var cn = db.DM_ChiNhanhs.SingleOrDefault(x => x.ID == int.Parse(cmbPhuongThuc.Value + "")); CBDN.DM_DVQLY giao, nhan; if (cn.IDMADVIQLY.Contains(",2,")) { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == 2); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == int.Parse(cn.IDMADVIQLY.Replace(",2,", "").Replace(",", ""))); } else { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemDauNguon); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemCuoiNguon); } strGiao = giao.TEN_DVIQLY; strNhan = nhan.TEN_DVIQLY; var imGDGiao = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemDauNguon && x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 3); var imGDNhan = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemCuoiNguon && x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 3); if (imGDGiao != null) { var ngGiao = db.DM_USERs.SingleOrDefault(x => x.IDUSER == imGDGiao.NguoiTao); strGDGiao = ngGiao.HOTEN + "</br> Thời gian xác nhận: " + imGDGiao.NgayTao; } if (imGDNhan != null) { var ngNhan = db.DM_USERs.SingleOrDefault(x => x.IDUSER == imGDNhan.NguoiTao); strGDNhan = ngNhan.HOTEN + "</br> Thời gian xác nhận: " + imGDNhan.NgayTao; } } else { strGiao = "TỔNG CÔNG TY ĐIỆN LỰC MIỀM BẮC"; strNhan = donvi.TEN_DVIQLY; } MTCSYT.Report.InBieuTong report = new MTCSYT.Report.InBieuTong(int.Parse(cmbPhuongThuc.Value + ""), ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), "", "", donvi.TEN_DVIQLY, strGiao, strNhan, 0, "", "", strGDNhan, strGDGiao); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void loadDanhMuc() { if (cmbDonVi.Value == null) { return; } DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); //grdDVT.DataSource = db.BC_TonThat110ChiTiet(int.Parse(cmbDonVi.Value+""), int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), cmbCapDienAp.Value + ""); grdDVT.DataSource = db.BC_TonThat_ChiTietCDA(int.Parse(cmbDonVi.Value + ""), int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), cmbCapDienAp.Value + ""); grdDVT.DataBind(); //var listTong = db.BC_TonThat110(int.Parse(cmbDonVi.Value + ""), int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), cmbCapDienAp.Value + ""); var listTong = db.BC_TonThatCDA(int.Parse(cmbDonVi.Value + ""), int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), cmbCapDienAp.Value + ""); grdBieuTong.DataSource = listTong; grdBieuTong.DataBind(); grdTonHao.DataSource = listTong; grdTonHao.DataBind(); grdTonThat.DataSource = listTong; grdTonThat.DataBind(); }
protected void cmbCuoiNguon_SelectedIndexChanged(object sender, EventArgs e) { SYS_Session session = (SYS_Session)Session["SYS_Session"]; DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var dvDN = dm_dviSer.SelectDM_DVQLY(int.Parse(session.User.ma_dviqly)); var dvChon = dm_dviSer.SelectDM_DVQLY(int.Parse(cmbCuoiNguon.Value + "")); txtMaDuongDat.Text = dvDN.MA_DVIQLY + "_" + dvChon.MA_DVIQLY; }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); tlDonVi.DataSource = db.BC_DaCoBaoCaoGiaoNhan2Chieu(ma_dviqly); tlDonVi.DataBind(); }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); tlDonVi.DataSource = db.DM_CayDanhMuc_Sum(ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), txtTimKiem.Text); tlDonVi.DataBind(); }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); tlDonVi.DataSource = db.DM_CayDanhMuc_KhuVuc(ma_dviqly); tlDonVi.DataBind(); }
private void BindComboDonVi() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); List <DM_DVQLY> lst_dmdv = new List <DM_DVQLY>(); lst_dmdv = dm_dviSer.SelectAllDM_DVQLY(); cmbDonVi.DataSource = lst_dmdv; cmbDonVi.ValueField = "IDMA_DVIQLY"; cmbDonVi.TextField = "NAME_DVIQLY"; cmbDonVi.DataBind(); }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); tlDonVi.DataSource = db.BC_ChiTiet_ChuaChot(ma_dviqly); tlDonVi.DataBind(); tlDonVi.ExpandAll(); }
private void laodDVCapCha() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var lst_dmdv = dm_dviSer.SelectAllDM_DVQLY(); cmbCapCha.DataSource = lst_dmdv; cmbCapCha.DataValueField = "IDMA_DVIQLY"; cmbCapCha.DataTextField = "TEN_DVIQLY"; cmbCapCha.DataBind(); }
private void LoadDataDV() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); // DataTable lst_dmdv = new DataTable(); var lst_dmdv = db.DM_DVQLies.Where(x => x.Type == 2).ToList(); cmbChonDonVi.DataSource = lst_dmdv; cmbChonDonVi.ValueField = "IDMA_DVIQLY"; cmbChonDonVi.TextField = "TEN_DVIQLY"; cmbChonDonVi.DataBind(); }
private void InTongHopDienNang() { if (cmbPhuongThuc.Value == null || cmbPhuongThuc.Value + "" == "0") { return; } MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); var cn = db.DM_ChiNhanhs.SingleOrDefault(x => x.ID == int.Parse(cmbPhuongThuc.Value + "")); CBDN.DM_DVQLY giao, nhan; if (cn.IDMADVIQLY.Contains(",2,")) { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == 2); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == int.Parse(cn.IDMADVIQLY.Replace(",2,", "").Replace(",", ""))); } else { giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemDauNguon); nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemCuoiNguon); } string strTPGiao = "", strTPNhan = "", strGDNhan = "", strGDGiao = ""; var lstHDKy = db.HD_ThongTinKies.Where(x => x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "")); foreach (var hdKy in lstHDKy) { if (hdKy.ChucVu == 2 && hdKy.IDMaDViQLy == giao.IDMA_DVIQLY) { strTPGiao = hdKy.Link; } if (hdKy.ChucVu == 2 && hdKy.IDMaDViQLy == nhan.IDMA_DVIQLY) { strTPNhan = hdKy.Link; } if (hdKy.ChucVu == 3 && hdKy.IDMaDViQLy == giao.IDMA_DVIQLY) { strGDGiao = hdKy.Link; } if (hdKy.ChucVu == 3 && hdKy.IDMaDViQLy == nhan.IDMA_DVIQLY) { strGDNhan = hdKy.Link; } } MTCSYT.Report.InBieuTong report = new MTCSYT.Report.InBieuTong(int.Parse(cmbPhuongThuc.Value + ""), ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), "", "", donvi.TEN_DVIQLY, giao.TEN_DVIQLY, nhan.TEN_DVIQLY, 0, strTPNhan, strTPGiao, "", ""); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); tlDonVi.DataSource = db.BC_CHOT_ChiTiet(ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + "")); tlDonVi.DataBind(); tlDonVi.ExpandAll(); }
private void LoadDataDV() { if (cmbCapCha.SelectedValue + "" != "") { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); // DataTable lst_dmdv = new DataTable(); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(int.Parse(cmbCapCha.SelectedValue + "")); cmbDVChuQuan.DataSource = lst_dmdv; cmbDVChuQuan.DataValueField = "IDMA_DVIQLY"; cmbDVChuQuan.DataTextField = "NAME_DVIQLY"; cmbDVChuQuan.DataBind(); } }
private void loadDanhMuc() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); var lst_dmdv = dm_dviSer.SelectAll_DVI_ByChild(ma_dviqly); cmbCuoiNguon.DataSource = lst_dmdv; cmbCuoiNguon.ValueField = "IDMA_DVIQLY"; cmbCuoiNguon.TextField = "TEN_DVIQLY"; cmbCuoiNguon.DataBind(); }
private int returnIDMaDV(string Name) { DM_DVQLYService serUser = new DM_DVQLYService(); List <DM_DVQLY> lst = serUser.SelectAllDM_DVQLY(); foreach (var dtname in lst) { if (dtname.MA_DVIQLY == Name.Split('-')[0]) { return(dtname.IDMA_DVIQLY); } } return(0); }
private void dZ() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); DataTable dt = dbOR.Get_BCTT_LDD(Request["DonVi"] + "", int.Parse("" + Request["Thang"]), int.Parse("" + Request["Nam"]), Request["LanBC"] + "", int.Parse(Request["LuyKe"] + "")); MTCSYT.Report.InTrungAp report = new MTCSYT.Report.InTrungAp(dt, "" + Request["Thang"], "" + Request["Nam"], donvi.TEN_DVIQLY); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
private void DN_TK_ChiTietThuongPham() { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(int.Parse(Request["DonVi"] + "")); DataTable dt = Dienthuongpham(); MTCSYT.Report.InDN_ThuongPham report = new MTCSYT.Report.InDN_ThuongPham(dt, "" + Request["Thang"], "" + Request["Nam"], donvi.TEN_DVIQLY, int.Parse(Request["DonVi"] + "")); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
protected void btnHuyNhan_Click(object sender, EventArgs e) { SYS_Session session = (SYS_Session)Session["SYS_Session"]; string strMadviqly = session.User.ma_dviqly; DM_DVQLYService isyOrganizationService = new DM_DVQLYService(); Entity.DM_DVQLY sysOrganization = new Entity.DM_DVQLY(); sysOrganization = isyOrganizationService.SelectDM_DVQLY(int.Parse(strMadviqly)); if (rdImportDuLieu.SelectedIndex == 0) { } else { var lstData = dbSQL.CMIS_DDoGCs.Where(x => x.MA_DVIQLY == sysOrganization.MA_DVIQLY && x.THANG == int.Parse(cmbThang.Value + "") && x.NAM == int.Parse(cmbNam.Value + "")); string tenfile = ""; foreach (var a in lstData) { tenfile = a.TENFILE; break; } Class.XuatXML_GCS class_xuatso = new Class.XuatXML_GCS(); DataSet ds = new DataSet(); CBDN.ConvertListToTable cv = new CBDN.ConvertListToTable(); DataTable dt = cv.ConvertToDataTable(lstData.ToList()); dt.Columns.Remove("TENFILE"); dt.Columns.Remove("TrangThaiDongBo"); ds.Tables.Add(dt); string strXML = class_xuatso.HTML_XuatFileCMIS(); string strXML1 = ds.GetXml(); //strXML1 = strXML1.Replace(",", "."); strXML1 = strXML1.Replace("<NewDataSet>", ""); strXML1 = strXML1.Replace("</NewDataSet>", ""); strXML1 = strXML1.Replace("<Table>", "<Table1>"); strXML1 = strXML1.Replace("</Table>", "</Table1>"); strXML += strXML1 + "</NewDataSet>"; string attachment = "attachment;filename=" + tenfile + ".XML"; Response.ClearContent(); Response.ContentType = "application/xml"; Response.AddHeader("content-disposition", attachment); Response.Write(strXML); Response.End(); } }
private void loadDLDongBo() { SYS_Session session = (SYS_Session)Session["SYS_Session"]; string strMadviqly = session.User.ma_dviqly; DM_DVQLYService isyOrganizationService = new DM_DVQLYService(); Entity.DM_DVQLY sysOrganization = new Entity.DM_DVQLY(); sysOrganization = isyOrganizationService.SelectDM_DVQLY(int.Parse(strMadviqly)); var lst = dbSQL.CMIS_DDoGCs.Where(x => x.MA_DVIQLY == sysOrganization.MA_DVIQLY && x.THANG == int.Parse(cmbThang.Value + "") && x.NAM == int.Parse(cmbNam.Value + "") && x.TrangThaiDongBo == 1); grdCN.DataSource = lst; grdCN.DataBind(); }
private void _LoadDonVi() { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; string strMadviqly = session.User.MA_DVIQLY; List <DM_DVQLY> lst_dmdv = new List <DM_DVQLY>(); lst_dmdv = dm_dviSer.DM_DVQLYandLEVER_BYDV(strMadviqly); TreeListOrganization.DataSource = lst_dmdv; TreeListOrganization.DataBind(); TreeListOrganization.ExpandToLevel(1); }
protected void grvModunManager_DataBinding(object sender, EventArgs e) { GridViewDataComboBoxColumn column = ((GridViewDataComboBoxColumn)(sender as ASPxGridView).Columns["Manager"]); DM_USERService _UserService = new DM_USERService(); column.PropertiesComboBox.DataSource = _UserService.SelectAllSYS_User_IsActive(0); column.PropertiesComboBox.TextField = "USERNAME"; column.PropertiesComboBox.ValueField = "IDUSER"; GridViewDataComboBoxColumn columnDV = ((GridViewDataComboBoxColumn)(sender as ASPxGridView).Columns["DonVi"]); DM_DVQLYService _DVService = new DM_DVQLYService(); columnDV.PropertiesComboBox.DataSource = _DVService.SelectAllDM_DVQLY(); columnDV.PropertiesComboBox.TextField = "NAME_DVIQLY"; columnDV.PropertiesComboBox.ValueField = "IDMA_DVIQLY"; }
protected void btnCapNhat_Click(object sender, EventArgs e) { DM_DVQLYService dm_dviSer = new DM_DVQLYService(); SYS_Session session = (SYS_Session)Session["SYS_Session"]; if (Session["Add"] + "" == "0") { var qtCT = (DataRowView)grdDVT.GetRow(grdDVT.FocusedRowIndex); db.UPDATE_TTTT_DM_TTKD(txtMA_CANHBAO.Text, txtTT_CANHBAO.Text, txtDX_CANHBAO.Text); } else { db.INSERT_TTTT_DM_TTKD(txtMA_CANHBAO.Text, txtTT_CANHBAO.Text, txtDX_CANHBAO.Text); } pcAddRoles.ShowOnPageLoad = false; _DataBind(); }
private void InTongHopDienNang() { if (cmbPhuongThuc.Value == null || cmbPhuongThuc.Value + "" == "") { return; } MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); // if (Request["XacNhan"] + "" == "1") kiemtra = true; var cn = db.DM_ChiNhanhs.SingleOrDefault(x => x.ID == int.Parse(cmbPhuongThuc.Value + "")); var giao = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemDauNguon); var nhan = db.DM_DVQLies.SingleOrDefault(x => x.IDMA_DVIQLY == cn.DiemCuoiNguon); string strTPGiao = "", strTPNhan = "", strGDNhan = "", strGDGiao = ""; //var imTPGiao = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemDauNguon && x.IDChinhNhanh==int.Parse(cmbPhuongThuc.Value+"") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 2); //var imTPNhan = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemCuoiNguon && x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 2); var imGDGiao = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemDauNguon && x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 3 && x.TrangThai == null); var imGDNhan = db.HD_ThongTinKies.SingleOrDefault(x => x.IDMaDViQLy == cn.DiemCuoiNguon && x.IDChinhNhanh == int.Parse(cmbPhuongThuc.Value + "") && x.Thang == int.Parse(cmbThang.Value + "") && x.Nam == int.Parse(cmbNam.Value + "") && x.ChucVu == 3 && x.TrangThai == null); //if (imTPGiao != null) // strTPGiao = imTPGiao.Link; //if (imTPNhan != null) // strTPNhan = imTPNhan.Link; if (imGDGiao != null) { var ngGiao = db.DM_USERs.SingleOrDefault(x => x.IDUSER == imGDGiao.NguoiTao); strGDGiao = ngGiao.HOTEN + "</br> Thời gian xác nhận: " + imGDGiao.NgayTao; } if (imGDNhan != null) { var ngNhan = db.DM_USERs.SingleOrDefault(x => x.IDUSER == imGDNhan.NguoiTao); strGDNhan = ngNhan.HOTEN + "</br> Thời gian xác nhận: " + imGDNhan.NgayTao; } MTCSYT.Report.InBieuTong report = new MTCSYT.Report.InBieuTong(int.Parse(cmbPhuongThuc.Value + ""), ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), "", "", donvi.TEN_DVIQLY, giao.TEN_DVIQLY, nhan.TEN_DVIQLY, 0, strTPNhan, strTPGiao, strGDNhan, strGDGiao); ReportViewer1.Report = report; ReportToolbar1.ReportViewer = ReportViewer1; }
//private void loadDanhMuc() //{ // MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; // int ma_dviqly = int.Parse(session.User.ma_dviqly + ""); // tlDonVi.DataSource = db.db_ChiNhanhSelectXacNhan(ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + "")).ToList(); // tlDonVi.DataBind(); //} private void InTongHopDienNang() { if (cmbPhuongThuc.Value != null) { MTCSYT.SYS_Session session = (MTCSYT.SYS_Session)Session["SYS_Session"]; int ma_dviqly = int.Parse(session.User.ma_dviqly); DM_DVQLYService dm_dviSer = new DM_DVQLYService(); var donvi = dm_dviSer.SelectDM_DVQLY(ma_dviqly); bool kiemtra = false; // if (Request["XacNhan"] + "" == "1") kiemtra = true; //MTCSYT.Report.InBieuTong report = new MTCSYT.Report.InBieuTong(int.Parse(cmbPhuongThuc.Value + ""), ma_dviqly, int.Parse(cmbThang.Value + ""), int.Parse(cmbNam.Value + ""), kiemtra, kiemtra, "", "", donvi.TEN_DVIQLY, 0,"","","",""); //ReportViewer1.Report = report; //ReportToolbar1.ReportViewer = ReportViewer1; } }