Ejemplo n.º 1
0
        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;
        }
Ejemplo n.º 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;
                }
            }
        }
Ejemplo n.º 3
0
        protected override void SetDefaultValueOnCreate()
        {
            NguoiSoanThao.SelectByValue(Sessions.UserID);

            if (!string.IsNullOrEmpty(Parameters.VbdhCode))
            {
                ShowVBDHDocumentInfo();
            }
        }
Ejemplo n.º 4
0
        protected override void BindValueToPageControls()
        {
            foreach (var user in UserServices.GetList(new[] { UserRole.LanhDaoDonVi, UserRole.LanhDaoVP, UserRole.TruongPhongBan }))
            {
                NguoiKy.AddSelectItem(user.FullName, user.UserID.ToString(), user.DepartmentName.ToUpper());
            }

            NguoiSoanThao.BindData(UserServices.GetList(), "UserID", "FullName", "DepartmentName");
            LoaiVanBan.BindData(DocumentCategoryServices.GetList(), "DocumentCategoryID", "DocumentCategoryName");
        }
Ejemplo n.º 5
0
 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);
 }
Ejemplo n.º 6
0
 protected override void BindValueToPageControls()
 {
     NguoiKy.BindData(UserServices.GetList(new[] { UserRole.LanhDaoUBNDTinh, UserRole.LanhDaoVPUBNDTinh }), "UserID", "FullName", "DepartmentName");
     NguoiSoanThao.BindData(UserServices.GetList(new[] { UserRole.ChuyenVienVPUBNDTinh }), "UserID", "FullName", "DepartmentName");
     LoaiVanBan.BindData(DocumentCategoryServices.GetList(), "DocumentCategoryID", "DocumentCategoryName");
 }
Ejemplo n.º 7
0
 protected override void SetDefaultValueOnCreate()
 {
     NguoiSoanThao.SelectByValue(Sessions.UserID);
 }