Exemple #1
0
        protected override void CreateNewObject()
        {
            report = new Report
            {
                ReportContent = NoiDungThucHien.Text,
                PerformOnDate = ThoiGianThucHien.Text.ToDateTime(),
                RequestID     = Parameters.Pid,
                Status        = TrangThai.SelectedValue.ToInteger(),
                ReporterName  = Sessions.DisplayName,
                DepartmentID  = Sessions.DepartmentID
            };

            if (!string.IsNullOrEmpty(VanBanDaBaoCao.SelectedValue.Trim()))
            {
                ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient();
                client.Endpoint.Address = new System.ServiceModel.EndpointAddress(AppSettings.HSCV_Service);
                var document = client.GetVBDiByIDs(new ArrayOfString {
                    VanBanDaBaoCao.SelectedValue.Trim()
                }).SingleOrDefault();

                ReportServices.Create(report: report, performIds: ThucHien.GetSelectedValues(), fileContent: document?.FileDinhKems?.FirstOrDefault()?.DuLieu, fileName: document?.FileDinhKems?.FirstOrDefault()?.TenFileDinhKem, uploadFolder: AppSettings.UploadFolder, isStaffReport: report.Request.CoQuyenXacNhan, isSendToProvince: true);
            }
            else
            {
                ReportServices.Create(report: report, performIds: ThucHien.GetSelectedValues(), fileContent: FileDinhKem.PostedFile, fileName: FileDinhKem.PostedFile?.FileName, uploadFolder: AppSettings.UploadFolder, isStaffReport: report.Request.CoQuyenXacNhan, isSendToProvince: true);
            }

            ExceptionlessClient.Default.SubmitEvent(new Event {
                Message = $"Nhập báo cáo thực hiện YKCD ({Sessions.DisplayName})", Type = "Nhập báo cáo", Source = AppSettings.AGENCY_NAME
            });

            Redirector.Redirect(ViewNames.Agency.ThongTinYKCD, "id", Parameters.Pid);
        }
Exemple #2
0
        protected void ShowVBDHDocumentInfo()
        {
            //Khởi tạo services
            ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient();

            client.Endpoint.Address = new System.ServiceModel.EndpointAddress(AppSettings.HSCV_Service);

            if (!string.IsNullOrEmpty(Parameters.VbdhCode))
            {
                var document = client.GetVBDiByIDs(new ArrayOfString {
                    Parameters.VbdhCode
                }).SingleOrDefault();
                ViewState["SyncDoc"] = document;

                if (document != null)
                {
                    SoHieuVanBan.Text = document.SoKyHieu;
                    TrichYeu.Text     = document.TrichYeu;
                    NgayBanHanh.Text  = document.NgayPhatHanh;
                    NguoiKy.SelectByValue(UserServices.GetUser(document.NguoiKy).UserID);
                    NguoiSoanThao.SelectByValue(Sessions.UserID);
                    LoaiVanBan.SelectByValue(4);

                    VanBanNgoai.Checked = true;
                    VanBanNgoai.Enabled = false;
                }
            }
        }
Exemple #3
0
 protected void VanBanDaBaoCao_OnSelectedIndexChanged(object sender, EventArgs e)
 {
     if (!string.IsNullOrEmpty(VanBanDaBaoCao.SelectedValue.Trim()))
     {
         ExchangeDocServiceSoapClient client = new ExchangeDocServiceSoapClient();
         client.Endpoint.Address = new System.ServiceModel.EndpointAddress(AppSettings.HSCV_Service);
         var document = client.GetVBDiByIDs(new ArrayOfString {
             VanBanDaBaoCao.SelectedValue.Trim()
         }).SingleOrDefault();
         NoiDungThucHien.Text  = $"Đã có văn bản số {VanBanDaBaoCao.SelectedItem.Text} ban hành ngày {document.NgayPhatHanh} báo cáo UBND tỉnh";
         ThoiGianThucHien.Text = document.NgayPhatHanh;
         TrangThai.SelectByValue(2);
     }
 }