예제 #1
0
        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();
            }
        }
예제 #2
0
        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();
        }
예제 #3
0
        protected void TreeListOrganization_CustomDataCallback(object sender, DevExpress.Web.ASPxTreeList.TreeListCustomDataCallbackEventArgs e)
        {
            DM_DVQLYService isyOrganizationService = new DM_DVQLYService();

            Entity.DM_DVQLY sysOrganization = new Entity.DM_DVQLY();

            string       key  = e.Argument.ToString();
            TreeListNode node = TreeListOrganization.FindNodeByKeyValue(key);

            string[] result = new string[4];
            //result[0] = node["MA_DVIQLY"].ToString();
            result[0] = node["TEN_DVIQLY"].ToString();
            result[1] = node["MA_DVIQLY"].ToString();
            result[2] = node["ParentId"].ToString();
            result[3] = node["TenVietTat"].ToString();
            e.Result  = result;
            LoadData();
        }
예제 #4
0
        private void LoadData()
        {
            DM_DVQLYService isyOrganizationService = new DM_DVQLYService();

            Entity.DM_DVQLY sysOrganization = new Entity.DM_DVQLY();

            if (TreeListOrganization.FocusedNode != null)
            {
                var parentNode = TreeListOrganization.FocusedNode;
                //cmbChoseParent.SelectedIndex = IndexOfTreelist(parentNode.ParentNode.Key);
                int IDOrganization = int.Parse(TreeListOrganization.FocusedNode.Key.ToString());

                sysOrganization          = isyOrganizationService.SelectDM_DVQLY(int.Parse(TreeListOrganization.FocusedNode.Key));
                txtNameOrganization.Text = sysOrganization.MA_DVIQLY;
                txtTenDV.Text            = sysOrganization.TEN_DVIQLY;
                txtTenVietTat.Text       = sysOrganization.TenVietTat;

                LoadCMBChooseParent(sysOrganization.ParentId);
                //cmbChoseParent.Value = sysOrganization.ParentId;
                Session["Organization"] = sysOrganization;
            }
        }