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; } } }
protected override void ShowObjectInformation() { item = DocumentServices.GetById(LongId); ViewState["CurrentObject"] = item; SoHieuVanBan.Text = item.DocumentCode; NgayBanHanh.Text = item.ReleaseDate.ToDateString(); TrichYeu.Text = item.MainContent; LoaiVanBan.SelectByValue(item.DocumentCategoryID); if (item.SignerID > 0) { NguoiKy.SelectByValue(item.SignerID); NguoiSoanThao.SelectByValue(item.WriterID); VanBanNgoai.Checked = false; TenNguoiKy.Visible = false; NguoiKy.Visible = true; SoanThaoPH.Visible = true; } else { VanBanNgoai.Checked = true; TenNguoiKy.Visible = true; NguoiKy.Visible = false; SoanThaoPH.Visible = false; } VanBanNgoai.Enabled = false; }
protected override void SetDefaultValueOnCreate() { NguoiSoanThao.SelectByValue(Sessions.UserID); if (!string.IsNullOrEmpty(Parameters.VbdhCode)) { ShowVBDHDocumentInfo(); } }
protected override void ShowObjectInformation() { item = DocumentServices.GetById(LongId); ViewState["CurrentObject"] = item; SoHieuVanBan.Text = item.DocumentCode; NguoiKy.SelectByValue(item.SignerID); NguoiSoanThao.SelectByValue(item.WriterID); NgayBanHanh.Text = item.ReleaseDate.ToDateString(); TrichYeu.Text = item.MainContent; LoaiVanBan.SelectByValue(item.DocumentCategoryID); }
protected override void SetDefaultValueOnCreate() { NguoiSoanThao.SelectByValue(Sessions.UserID); }