protected void btnUpdate18_Click(object sender, EventArgs e)
        {
            DotDanhGiaConfigInfo info = new DotDanhGiaConfigInfo();

            info.IDDotDanhGia   = ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue);
            info.IDDiemDoanhThu = ConvertUtility.ToDouble(txtDoanhThuQUANGCAOSO.Text);
            info.IDDiemLoiNhuan = ConvertUtility.ToDouble(txtLoiNhuanQUANGCAOSO.Text);
            info.IDTrungTam     = 18;

            DotDanhGiaController.UpdateDoanhThuLoiNhuan(info);
        }
        protected void btnUpdate2_Click(object sender, EventArgs e)
        {
            DotDanhGiaConfigInfo info = new DotDanhGiaConfigInfo();

            info.IDDotDanhGia   = ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue);
            info.IDDiemDoanhThu = ConvertUtility.ToDouble(dropDoanhThuNSHC.SelectedValue);
            info.IDDiemLoiNhuan = ConvertUtility.ToDouble(dropLoiNhuanNSHC.SelectedValue);
            info.IDTrungTam     = 2;

            DotDanhGiaController.UpdateDoanhThuLoiNhuan(info);
        }
        protected void btnUpdate7_Click(object sender, EventArgs e)
        {
            DotDanhGiaConfigInfo info = new DotDanhGiaConfigInfo();

            info.IDDotDanhGia = ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue);
            //info.IDDiemDoanhThu = ConvertUtility.ToDouble(dropDoanhThuBANQUYEN.SelectedValue);
            //info.IDDiemLoiNhuan = ConvertUtility.ToDouble(dropLoiNhuanBANQUYEN.SelectedValue);
            info.IDDiemDoanhThu = ConvertUtility.ToDouble(txtDoanhThuBanQuyen.Text);
            info.IDDiemLoiNhuan = ConvertUtility.ToDouble(txtLoiNhuanBanQuyen.Text);
            info.IDTrungTam     = 7;

            DotDanhGiaController.UpdateDoanhThuLoiNhuan(info);
        }
        protected void btnUpdate6_Click(object sender, EventArgs e)
        {
            DotDanhGiaConfigInfo info = new DotDanhGiaConfigInfo();

            info.IDDotDanhGia = ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue);
            //info.IDDiemDoanhThu = ConvertUtility.ToDouble(dropDoanhThuLUCKYFONE.SelectedValue);
            //info.IDDiemLoiNhuan = ConvertUtility.ToDouble(dropLoiNhuanLUCKYFONE.SelectedValue);
            info.IDDiemDoanhThu = ConvertUtility.ToDouble(txtDoanhThuLuckyFone.Text);
            info.IDDiemLoiNhuan = ConvertUtility.ToDouble(txtLoiNhuanLuckyFone.Text);
            info.IDTrungTam     = 6;

            DotDanhGiaController.UpdateDoanhThuLoiNhuan(info);
        }
示例#5
0
 public abstract void UpdateDoanhThuLoiNhuan(DotDanhGiaConfigInfo _DotDanhGiaInfo);
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);

            DotDanhGiaConfigInfo info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 1);

            try
            {
                //dropDoanhThuIT.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanIT.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuIT.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanIT.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                double diemDoanhThuHT = info.IDDiemDoanhThu * 12 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 18 / 100;

                if (diemDoanhThuHT > 12)
                {
                    diemDoanhThuHT = 12;
                }
                if (diemLoiNhuanHT > 18)
                {
                    diemLoiNhuanHT = 18;
                }

                lblDiemDT.Text = diemDoanhThuHT.ToString().Replace(".", ",");
                lblDiemLN.Text = diemLoiNhuanHT.ToString().Replace(".", ",");
                lblTongHT.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString().Replace(".", ",");
            }
            catch
            {
                //dropDoanhThuIT.SelectedIndex = 0;
                //dropLoiNhuanIT.SelectedIndex = 0;
            }


            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 2);

            //try
            //{
            //    dropDoanhThuNSHC.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanNSHC.SelectedValue = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuNSHC.SelectedIndex = 0;
            //    dropLoiNhuanNSHC.SelectedIndex = 0;
            //}

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 3);

            //try
            //{
            //    dropDoanhThuTCKT.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanTCKT.SelectedValue = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuTCKT.SelectedIndex = 0;
            //    dropLoiNhuanTCKT.SelectedIndex = 0;
            //}

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 4);

            try
            {
                //dropDoanhThuPTKD.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanPTKD.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuPTKD.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanPTKD.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_PTKD.Text   = diemDoanhThuHT.ToString("#.##");
                lblDiemLN_PTKD.Text   = diemLoiNhuanHT.ToString("#.##");
                lblTongDiem_PTKD.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuPTKD.SelectedIndex = 0;
                //dropLoiNhuanPTKD.SelectedIndex = 0;

                txtDoanhThuPTKD.Text = "";
                txtLoiNhuanPTKD.Text = "";
            }

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 5);

            try
            {
                //dropDoanhThuPTND.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanPTND.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuPTND.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanPTND.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_PTND.Text   = diemDoanhThuHT.ToString("#.##");
                lblDiemLN_PTND.Text   = diemLoiNhuanHT.ToString("#.##");
                lblTongDiem_PTND.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuPTND.SelectedIndex = 0;
                //dropLoiNhuanPTND.SelectedIndex = 0;

                txtDoanhThuPTND.Text = "";
                txtLoiNhuanPTND.Text = "";
            }

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 6);

            try
            {
                //dropDoanhThuLUCKYFONE.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanLUCKYFONE.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuLuckyFone.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanLuckyFone.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_LUCK.Text   = diemDoanhThuHT.ToString();
                lblDiemLN_LUCK.Text   = diemLoiNhuanHT.ToString();
                lblTongDiem_LUCK.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuLUCKYFONE.SelectedIndex = 0;
                //dropLoiNhuanLUCKYFONE.SelectedIndex = 0;
                txtDoanhThuLuckyFone.Text = "";
                txtLoiNhuanLuckyFone.Text = "";
            }

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 7);

            try
            {
                //dropDoanhThuBANQUYEN.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanBANQUYEN.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuBanQuyen.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanBanQuyen.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_BQ.Text   = diemDoanhThuHT.ToString();
                lblDiemLN_BQ.Text   = diemLoiNhuanHT.ToString();
                lblTongDiem_BQ.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuBANQUYEN.SelectedIndex = 0;
                //dropLoiNhuanBANQUYEN.SelectedIndex = 0;

                txtDoanhThuBanQuyen.Text = "";
                txtLoiNhuanBanQuyen.Text = "";
            }

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 8);

            //try
            //{
            //    dropDoanhThuDVKH.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanDVKH.SelectedValue = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuDVKH.SelectedIndex = 0;
            //    dropLoiNhuanDVKH.SelectedIndex = 0;
            //}

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 9);

            //try
            //{
            //    dropDoanhThuLINGO.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanLINGO.SelectedValue = info.IDDiemLoiNhuan.ToString();

            //    txtDiemUuDiem.Text = info.IDDiem1.ToString();
            //    txtPhatHanhThe.Text = info.IDDiem2.ToString();
            //    txtPos.Text = info.IDDiem3.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuLINGO.SelectedIndex = 0;
            //    dropLoiNhuanLINGO.SelectedIndex = 0;
            //    txtDiemUuDiem.Text = "";
            //    txtPhatHanhThe.Text = "";
            //    txtPos.Text = "";
            //}

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 10);

            //try
            //{
            //    dropDoanhThuPTDV.Text = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanPTDV.Text = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuPTDV.SelectedIndex = 0;
            //    dropLoiNhuanPTDV.SelectedIndex = 0;
            //}

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 11);

            //try
            //{
            //    dropDoanhThuTIEPTHISO.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanTIEPTHISO.Text = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropDoanhThuTIEPTHISO.SelectedIndex = 0;
            //    dropLoiNhuanTIEPTHISO.SelectedIndex = 0;
            //}

            //info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 14);

            //try
            //{
            //    dropDoanhThuDSTC.SelectedValue = info.IDDiemDoanhThu.ToString();
            //    dropLoiNhuanDSTC.Text = info.IDDiemLoiNhuan.ToString();
            //}
            //catch
            //{
            //    dropLoiNhuanDSTC.SelectedIndex = 0;
            //    dropLoiNhuanDSTC.SelectedIndex = 0;
            //}

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 15);

            try
            {
                //dropDoanhThuPTKD.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanPTKD.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuVPHCM.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanVPHCM.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_VPHCM.Text   = diemDoanhThuHT.ToString("#.##");
                lblDiemLN_VPHCM.Text   = diemLoiNhuanHT.ToString("#.##");
                lblTongDiem_VPHCM.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuPTKD.SelectedIndex = 0;
                //dropLoiNhuanPTKD.SelectedIndex = 0;

                txtDoanhThuVPHCM.Text = "";
                txtLoiNhuanVPHCM.Text = "";
            }

            info = DotDanhGiaController.GetInfoDotDanhGiaConfig(ConvertUtility.ToInt32(dropDotDanhGia.SelectedValue), 18);

            try
            {
                //dropDoanhThuPTKD.SelectedValue = info.IDDiemDoanhThu.ToString();
                //dropLoiNhuanPTKD.SelectedValue = info.IDDiemLoiNhuan.ToString();

                txtDoanhThuQUANGCAOSO.Text = info.IDDiemDoanhThu.ToString().Replace(".", ",");
                txtLoiNhuanQUANGCAOSO.Text = info.IDDiemLoiNhuan.ToString().Replace(".", ",");

                //int diemDoanhThuHT = GetDiemDTKinhDoanh((int)info.IDDiemDoanhThu);
                //int diemLoiNhuanHT = GetDiemLNKinhDoanh((int)info.IDDiemLoiNhuan);

                double diemDoanhThuHT = info.IDDiemDoanhThu * 24 / 100;
                double diemLoiNhuanHT = info.IDDiemLoiNhuan * 36 / 100;

                if (diemDoanhThuHT > 24)
                {
                    diemDoanhThuHT = 24;
                }
                if (diemLoiNhuanHT > 36)
                {
                    diemLoiNhuanHT = 36;
                }

                lblDiemDT_QUANGCAOSO.Text   = diemDoanhThuHT.ToString("#.##");
                lblDiemLN_QUANGCAOSO.Text   = diemLoiNhuanHT.ToString("#.##");
                lblTongDiem_QUANGCAOSO.Text = (diemDoanhThuHT + diemLoiNhuanHT).ToString("#.##");
            }
            catch
            {
                //dropDoanhThuPTKD.SelectedIndex = 0;
                //dropLoiNhuanPTKD.SelectedIndex = 0;

                txtDoanhThuQUANGCAOSO.Text = "";
                txtLoiNhuanQUANGCAOSO.Text = "";
            }
        }