Exemple #1
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            if (CurrentUser.RoleID == (int)Constants.Role.CEO || CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
            {
                btnUpdateAll.Visible = true;
            }
            else
            {
                btnUpdateAll.Visible = false;
            }

            //DataTable dt = DotDanhGiaController.checkDanhGiaThang(idDotDanhGia, idNhanVien);

            //if (dt != null && dt.Rows.Count > 0)
            //{
            //    if (idNhanVien == CurrentUser.UserID)
            //    {
            //        if (CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
            //        {
            //            btnUpdateAll.Visible = true;
            //        }
            //        else
            //        {
            //            if (ConvertUtility.ToInt32(dt.Rows[0]["TrangThai"]) <= (int)Constants.TrangThaiDanhGiaNhanVien.DangDanhGia)
            //            {
            //                btnUpdateAll.Visible = true;
            //            }
            //            else
            //            {
            //                btnUpdateAll.Visible = false;
            //            }
            //        }
            //    }
            //    else
            //    {
            //        btnUpdateAll.Visible = true;
            //    }
            //}
            //else
            //{
            //    btnUpdateAll.Visible = false;
            //}

            //DGCBCNVDanhGiaTDvaKLInfo info1 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 6);

            //if (info1 != null)
            //{
            //    dropDiemDVKH.SelectedValue = info1.DiemThongNhat.ToString();
            //    txtLyDoDVKH.Text = info1.GhiChu;
            //}

            DGCBCNVDanhGiaTDvaKLInfo info2 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 7);

            if (info2 != null)
            {
                //dropDiemThuong.SelectedValue = info2.DiemThongNhat.ToString();
                txtDiemThuong.Text = info2.DiemThongNhat.ToString();
                txtLyDoThuong.Text = info2.GhiChu;
            }

            //DGCBCNVDanhGiaTDvaKLInfo info3 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 8);

            //if (info3 != null)
            //{
            //    dropDiemPhat.SelectedValue = info3.DiemThongNhat.ToString();
            //    txtLyDoPhat.Text = info3.GhiChu;
            //}
        }
Exemple #2
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            DataTable dt = DotDanhGiaController.checkDanhGiaThang(idDotDanhGia, idNhanVien);

            if (dt != null && dt.Rows.Count > 0)
            {
                if (idNhanVien == CurrentUser.UserID)
                {
                    if (CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
                    {
                        btnUpdateAll.Visible = true;

                        td1.Attributes.Add("style", "width:25%");
                        td2.Attributes.Add("style", "width:25%");
                        td3.Attributes.Add("style", "width:25%");
                        td4.Attributes.Add("style", "width:25%");
                        td11.Attributes.Add("style", "width:25%");
                        td21.Attributes.Add("style", "width:25%");
                        td31.Attributes.Add("style", "width:25%");
                        td41.Attributes.Add("style", "width:25%");
                    }
                    else
                    {
                        td1.Attributes.Add("style", "width:25%");
                        td2.Attributes.Add("style", "width:25%");
                        td3.Attributes.Add("style", "width:25%");
                        td4.Attributes.Add("style", "width:25%");
                        td11.Attributes.Add("style", "width:25%");
                        td21.Attributes.Add("style", "width:25%");
                        td31.Attributes.Add("style", "width:25%");
                        td41.Attributes.Add("style", "width:25%");
                        if (ConvertUtility.ToInt32(dt.Rows[0]["TrangThai"]) <= (int)Constants.TrangThaiDanhGiaNhanVien.DangDanhGia)
                        {
                            btnUpdateAll.Visible = true;
                        }
                        else
                        {
                            btnUpdateAll.Visible = false;
                        }
                    }
                }
                else
                {
                    btnUpdateAll.Visible = true;
                    td1.Attributes.Add("style", "width:25%");
                    td2.Attributes.Add("style", "width:25%");
                    td3.Attributes.Add("style", "width:25%");
                    td4.Attributes.Add("style", "width:25%");
                    td11.Attributes.Add("style", "width:25%");
                    td21.Attributes.Add("style", "width:25%");
                    td31.Attributes.Add("style", "width:25%");
                    td41.Attributes.Add("style", "width:25%");

                    if (CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
                    {
                        btnUpdateAll.Visible = true;
                    }
                    else
                    {
                        if (ConvertUtility.ToInt32(dt.Rows[0]["TrangThai"]) == (int)Constants.TrangThaiDanhGiaNhanVien.ThongNhat)
                        {
                            btnUpdateAll.Visible = false;
                        }
                        else
                        {
                            btnUpdateAll.Visible = true;
                        }
                    }
                }

                if (CurrentUser.RoleID == (int)Constants.Role.TruongBoPhanKhoiHoTro || CurrentUser.RoleID == (int)Constants.Role.TruongBoPhanKhoiKinhDoanh)
                {
                    txtPTDanhGia1.Enabled = false;
                    txtPTDanhGia2.Enabled = false;
                }
                else
                {
                    if (idNhanVien == CurrentUser.UserID)
                    {
                        if (CurrentUser.RoleID == (int)Constants.Role.TruongPhong || CurrentUser.RoleID == (int)Constants.Role.PhoPhong)
                        {
                            txtTBPDanhGia1.Enabled = true;
                            txtTBPDanhGia2.Enabled = true;
                            txtTBPDanhGia3.Enabled = true;
                            txtTBPDanhGia4.Enabled = true;
                        }
                    }
                    else
                    {
                        if (CurrentUser.RoleID == (int)Constants.Role.TruongPhong || CurrentUser.RoleID == (int)Constants.Role.PhoPhong)
                        {
                            txtTBPDanhGia1.Enabled = true;
                            txtTBPDanhGia2.Enabled = true;
                            txtTBPDanhGia3.Enabled = true;
                            txtTBPDanhGia4.Enabled = true;
                        }
                        else
                        {
                            txtPTDanhGia1.Enabled  = false;
                            txtTBPDanhGia1.Enabled = false;
                            txtNhanXet1.Enabled    = false;

                            txtPTDanhGia2.Enabled  = false;
                            txtTBPDanhGia2.Enabled = false;
                            txtNhanXet2.Enabled    = false;

                            txtPTDanhGia3.Enabled  = false;
                            txtTBPDanhGia3.Enabled = false;
                            txtNhanXet3.Enabled    = false;

                            txtPTDanhGia4.Enabled  = false;
                            txtTBPDanhGia4.Enabled = false;
                            txtNhanXet4.Enabled    = false;
                        }
                    }
                }
            }

            DGCBCNVDanhGiaTDvaKLInfo info1 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 1);

            if (info1 != null)
            {
                txtPTDanhGia1.Text  = info1.DiemTBPDG.ToString();     //.Replace(".", ",");
                txtTBPDanhGia1.Text = info1.DiemThongNhat.ToString(); //.Replace(".", ",");
                txtNhanXet1.Text    = info1.GhiChu;
            }

            DGCBCNVDanhGiaTDvaKLInfo info2 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 2);

            if (info2 != null)
            {
                txtPTDanhGia2.Text  = info2.DiemTBPDG.ToString();     //.Replace(".", ",");
                txtTBPDanhGia2.Text = info2.DiemThongNhat.ToString(); //.Replace(".", ",");
                txtNhanXet2.Text    = info2.GhiChu;
            }

            DGCBCNVDanhGiaTDvaKLInfo info3 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 3);

            if (info3 != null)
            {
                txtPTDanhGia3.Text  = info3.DiemTBPDG.ToString();     //.Replace(".", ",");
                txtTBPDanhGia3.Text = info3.DiemThongNhat.ToString(); //.Replace(".", ",");
                txtNhanXet3.Text    = info3.GhiChu;
            }
            else
            {
                txtPTDanhGia3.Text  = txtTBPDanhGia1.Text;
                txtTBPDanhGia3.Text = txtTBPDanhGia1.Text;
                txtNhanXet3.Text    = "";
            }

            DGCBCNVDanhGiaTDvaKLInfo info4 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 4);

            if (info4 != null)
            {
                txtPTDanhGia4.Text  = info4.DiemTBPDG.ToString();     //.Replace(".", ",");
                txtTBPDanhGia4.Text = info4.DiemThongNhat.ToString(); //.Replace(".", ",");
                txtNhanXet4.Text    = info4.GhiChu;
            }
            else
            {
                txtPTDanhGia4.Text  = txtTBPDanhGia1.Text;
                txtTBPDanhGia4.Text = txtTBPDanhGia1.Text;
                txtNhanXet4.Text    = "";
            }
        }
Exemple #3
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            DataTable dt = DotDanhGiaController.checkDanhGiaThang(idDotDanhGia, idNhanVien);

            if (dt != null && dt.Rows.Count > 0)
            {
                //if (idNhanVien == CurrentUser.UserID)
                //{
                //    if (CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
                //    {
                //        btnUpdateAll.Visible = true;
                //        td1.Attributes.Add("style", "width:20%");
                //        td2.Attributes.Add("style", "width:20%");
                //        td11.Attributes.Add("style", "width:20%");
                //        td21.Attributes.Add("style", "width:20%");
                //    }
                //    else
                //    {
                //        td1.Attributes.Add("style", "width:20%");
                //        td2.Attributes.Add("style", "width:20%");
                //        td11.Attributes.Add("style", "width:20%");
                //        td21.Attributes.Add("style", "width:20%");
                //        //if (ConvertUtility.ToInt32(dt.Rows[0]["TrangThai"]) <= (int)Constants.TrangThaiDanhGiaNhanVien.DangDanhGia)
                //        //{
                //        //    btnUpdateAll.Visible = true;
                //        //}
                //        //else
                //        //{
                //        //    btnUpdateAll.Visible = false;
                //        //}
                //    }
                //}
                //else
                //{
                //    btnUpdateAll.Visible = true;
                //    td1.Attributes.Add("style", "width:20%");
                //    td2.Attributes.Add("style", "width:20%");
                //    td11.Attributes.Add("style", "width:20%");
                //    td21.Attributes.Add("style", "width:20%");
                //}
                if (CurrentUser.RoleID == (int)Constants.Role.CEO || CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
                {
                    btnUpdateAll.Visible = true;
                }
                else
                {
                    btnUpdateAll.Visible = false;
                }
            }

            DGCBCNVDanhGiaTDvaKLInfo info1 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 1);

            if (info1 != null)
            {
                txtPTDanhGia1.Text  = info1.DiemTBPDG.ToString().Replace(".", ",");
                txtTBPDanhGia1.Text = info1.DiemThongNhat.ToString().Replace(".", ",");
                txtNhanXet1.Text    = info1.GhiChu;
            }

            DGCBCNVDanhGiaTDvaKLInfo info2 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 2);

            if (info2 != null)
            {
                txtPTDanhGia2.Text  = info2.DiemTBPDG.ToString().Replace(".", ",");
                txtTBPDanhGia2.Text = info2.DiemThongNhat.ToString().Replace(".", ",");
                txtNhanXet2.Text    = info2.GhiChu;
            }
        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            DataTable dt = DotDanhGiaController.checkDanhGiaThang(idDotDanhGia, idNhanVien);

            if (dt != null && dt.Rows.Count > 0)
            {
                if (idNhanVien == CurrentUser.UserID)
                {
                    if (CurrentUser.IsAdmin || CurrentUser.IsSuperAdmin)
                    {
                        td1.Attributes.Add("style", "width:25%");
                        td2.Attributes.Add("style", "width:25%");
                        td3.Attributes.Add("style", "width:25%");
                        td4.Attributes.Add("style", "width:25%");
                        //td5.Attributes.Add("style", "width:20%");
                        td11.Attributes.Add("style", "width:25%");
                        td21.Attributes.Add("style", "width:25%");
                        td31.Attributes.Add("style", "width:25%");
                        td41.Attributes.Add("style", "width:25%");
                        //td51.Attributes.Add("style", "width:20%");
                    }
                    else
                    {
                        td1.Attributes.Add("style", "width:25%");
                        td2.Attributes.Add("style", "width:25%");
                        td3.Attributes.Add("style", "width:25%");
                        td4.Attributes.Add("style", "width:25%");
                        //td5.Attributes.Add("style", "width:20%");
                        td11.Attributes.Add("style", "width:25%");
                        td21.Attributes.Add("style", "width:25%");
                        td31.Attributes.Add("style", "width:25%");
                        td41.Attributes.Add("style", "width:25%");
                        //td51.Attributes.Add("style", "width:20%");
                    }
                }
                else
                {
                    td1.Attributes.Add("style", "width:25%");
                    td2.Attributes.Add("style", "width:25%");
                    td3.Attributes.Add("style", "width:25%");
                    td4.Attributes.Add("style", "width:25%");
                    //td5.Attributes.Add("style", "width:20%");
                    td11.Attributes.Add("style", "width:25%");
                    td21.Attributes.Add("style", "width:25%");
                    td31.Attributes.Add("style", "width:25%");
                    td41.Attributes.Add("style", "width:25%");
                    //td51.Attributes.Add("style", "width:20%");
                }

                //if (CurrentUser.RoleID != (int)Constants.Role.TruongBoPhanKhoiHoTro && CurrentUser.RoleID != (int)Constants.Role.TruongBoPhanKhoiKinhDoanh)
                //{
                //    txtPTDanhGia1.Enabled = false;
                //    txtPTDanhGia2.Enabled = false;
                //}
                //else
                //{
                //    txtPTDanhGia1.Enabled = true;
                //    txtPTDanhGia2.Enabled = true;
                //if (idNhanVien == CurrentUser.UserID)
                //{
                //    if (CurrentUser.RoleID == (int)Constants.Role.TruongPhong)
                //    {
                //        txtTBPDanhGia1.Enabled = false;
                //        txtTBPDanhGia2.Enabled = false;
                //    }
                //}
                //else
                //{
                //if (CurrentUser.RoleID == (int)Constants.Role.TruongPhong)
                //{
                //    txtPTDanhGia1.Enabled = false;
                //    txtPTDanhGia2.Enabled = false;
                //    //txtTBPDanhGia1.Enabled = false;
                //    //txtTBPDanhGia2.Enabled = false;
                //}
                //else
                //{
                //    txtPTDanhGia1.Enabled = false;
                //    //txtTBPDanhGia1.Enabled = false;
                //    txtNhanXet1.Enabled = false;

                //    txtPTDanhGia2.Enabled = false;
                //    //txtTBPDanhGia2.Enabled = false;
                //    txtNhanXet2.Enabled = false;
                //}
                //}
                //}
            }

            DGCBCNVDanhGiaTDvaKLInfo info1 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 1);

            if (info1 != null)
            {
                txtPTDanhGia1.Text = info1.DiemThongNhat.ToString();//.Replace(".", ",");
                //txtTBPDanhGia1.Text = info1.DiemThongNhat.ToString().Replace(".", ",");
                txtNhanXet1.Text = info1.GhiChu;
            }

            DGCBCNVDanhGiaTDvaKLInfo info2 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 2);

            if (info2 != null)
            {
                txtPTDanhGia2.Text = info2.DiemThongNhat.ToString();//.Replace(".", ",");
                //txtTBPDanhGia2.Text = info2.DiemThongNhat.ToString().Replace(".", ",");
                txtNhanXet2.Text = info2.GhiChu;
            }

            DGCBCNVDanhGiaTDvaKLInfo info3 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 3);

            if (info3 != null)
            {
                txtPTDanhGia3.Text  = info3.DiemTBPDG.ToString();//.Replace(".", ",");
                txtTBPDanhGia3.Text = info3.DiemThongNhat.ToString().Replace(".", ",");
                txtNhanXet3.Text    = info3.GhiChu;
            }
            else
            {
                txtPTDanhGia3.Text  = txtPTDanhGia1.Text;
                txtTBPDanhGia3.Text = txtPTDanhGia1.Text;
                txtNhanXet3.Text    = "";
            }

            DGCBCNVDanhGiaTDvaKLInfo info4 = DGCBCNVDanhGiaTDvaKLController.GetInfo_DanhGiaThang(idDotDanhGia, idNhanVien, 4);

            if (info4 != null)
            {
                txtPTDanhGia4.Text  = info4.DiemTBPDG.ToString();     //.Replace(".", ",");
                txtTBPDanhGia4.Text = info4.DiemThongNhat.ToString(); //.Replace(".", ",");
                txtNhanXet4.Text    = info4.GhiChu;
            }
            else
            {
                txtPTDanhGia4.Text  = txtPTDanhGia1.Text;
                txtTBPDanhGia4.Text = txtPTDanhGia1.Text;
                txtNhanXet4.Text    = "";
            }
        }