示例#1
0
        protected override void BindValueToPageControls()
        {
            var request = RequestServices.GetById(Parameters.Pid);

            ThucHien.Items.Clear();

            if (request.Performs?.Count > 0)
            {
                foreach (var perform in request.Performs)
                {
                    ThucHien.AddSelectItem(perform.DepartmentID > 0 ? perform.Department.DepartmentName : perform.User.FullName, perform.PerformID.ToString());
                }
            }
            else if (request.IsAgencyRequest)
            {
                ThucHien.Items.Add(new ListItem(text: AppSettings.AGENCY_NAME, value: ""));
            }
        }
示例#2
0
        protected override void BindValueToPageControls()
        {
            var request = RequestServices.GetById(Parameters.Pid);

            ThucHien.Items.Clear();

            if (request.Performs?.Count > 0)
            {
                foreach (var perform in request.Performs)
                {
                    ThucHien.AddSelectItem(perform.DepartmentID > 0 ? perform.Department.DepartmentName : perform.User.FullName, perform.PerformID.ToString());
                }
            }
            else if (request.IsProvinceRequest)
            {
                ThucHien.Items.Add(new ListItem(text: AppSettings.AGENCY_NAME, value: ""));
            }

            //Hiển thị ô chọn văn bản có ý kiến chỉ đạo nếu đây là YKCD của UBND tỉnh và có dữ liệu ở HSCV Service
            if (!string.IsNullOrEmpty(AppSettings.HSCV_Service) && request.IsProvinceRequest && AppSettings.IS_USE_SYNC_DOCUMENT_REPORT)
            {
                ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient();
                client.Endpoint.Address = new EndpointAddress(AppSettings.HSCV_Service);

                var syncDocs = client.GetVBDiHasIdeaLeader(DateTime.Now.AddDays(-7), DateTime.Now);

                if (syncDocs != null && syncDocs.Length > 0)
                {
                    VanBanDaBaoCaoGroup.Visible = true;

                    VanBanDaBaoCao.Items.Clear();

                    foreach (var item in syncDocs)
                    {
                        VanBanDaBaoCao.AddSelectItem($"{item.SoKyHieu} ({item.TrichYeu})", item.MaVBDi);
                    }

                    VanBanDaBaoCao.AddSelectItem("Chọn văn bản báo cáo", "");
                }
            }
        }