private void SavePricePointByCustomer(IRMS.Entities.GeneralMemoConcession genMemoObj)
        {
            PricePointManager PPointManager = new PricePointManager();
            CustomerInfoManager custInfoManager = new CustomerInfoManager();

            //List<PriceGroup> _PriceGroupList = new List<PriceGroup>();
            //_PriceGroupList = _PGManager.PriceGroupConcession();

            PricePoint pricePointObj;
            int iTotalRow = gvMarkdownList.Rows.Count;
            int iRow = 0;

            for (iRow = 0; iRow < iTotalRow; iRow++)
            {
                pricePointObj = new PricePoint();
                pricePointObj.StyleNo = gvMarkdownList.Rows[iRow].Cells[2].Text;
                pricePointObj.BrandName = DDLBrand.SelectedValue;
                pricePointObj.Price_Type = genMemoObj.PriceType;
                pricePointObj.PGNo = custInfoManager.GetCustomerByKey(genMemoObj.GroupNumber).PriceGroupNo;
                pricePointObj.Price = Convert.ToDecimal(gvMarkdownList.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pricePointObj.PGNo));
                pricePointObj.Date_Posted = genMemoObj.MemoDate;
                pricePointObj.f_Date = genMemoObj.FromDate;
                pricePointObj.t_Date = genMemoObj.ToDate;
                pricePointObj.Group_No = genMemoObj.GroupNumber;
                pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                pricePointObj.Memo_No = genMemoObj.MemoNumber;
                PPointManager.Save(pricePointObj);
            }

            iTotalRow = gvNewMarkdown.Rows.Count;
            for (iRow = 0; iRow < iTotalRow; iRow++)
            {
                pricePointObj = new PricePoint();
                pricePointObj.StyleNo = gvNewMarkdown.Rows[iRow].Cells[2].Text;
                pricePointObj.BrandName = DDLBrand.SelectedValue;
                pricePointObj.Price_Type = genMemoObj.PriceType;
                pricePointObj.PGNo = custInfoManager.GetCustomerByKey(genMemoObj.GroupNumber).PriceGroupNo;
                pricePointObj.Price = Convert.ToDecimal(gvNewMarkdown.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pricePointObj.PGNo));
                pricePointObj.Date_Posted = genMemoObj.MemoDate;
                pricePointObj.f_Date = genMemoObj.FromDate;
                pricePointObj.t_Date = genMemoObj.ToDate;
                pricePointObj.Group_No = genMemoObj.GroupNumber;
                pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                pricePointObj.Memo_No = genMemoObj.MemoNumber;
                PPointManager.Save(pricePointObj);
            }
        }
        private void SavePricePointBySubArea(IRMS.Entities.GeneralMemoConcession genMemoObj)
        {
            PricePointManager PPointManager = new PricePointManager();
            List<PriceGroup> _PriceGroupList = new List<PriceGroup>();
            _PriceGroupList = _PGManager.PriceGroupConcession();

            PricePoint pricePointObj;
            int iTotalRow = gvMarkdownList.Rows.Count;
            int iRow = 0;

            foreach (PriceGroup pgroupItem in _PriceGroupList)
            {
                for (iRow = 0; iRow < iTotalRow; iRow++)
                {
                    pricePointObj = new PricePoint();
                    pricePointObj.StyleNo = gvMarkdownList.Rows[iRow].Cells[2].Text;
                    pricePointObj.BrandName = DDLBrand.SelectedValue;
                    pricePointObj.PGNo = pgroupItem.PGNo;
                    pricePointObj.Price_Type = genMemoObj.PriceType;
                    pricePointObj.Price = Convert.ToDecimal(gvMarkdownList.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pgroupItem.PGNo));
                    pricePointObj.Date_Posted = genMemoObj.MemoDate;
                    pricePointObj.f_Date = genMemoObj.FromDate;
                    pricePointObj.t_Date = genMemoObj.ToDate;
                    pricePointObj.Group_No = Convert.ToInt32(DDLSubArea.SelectedItem.Value);
                    //pricePointObj.Group_No = genMemoObj.GroupNumber;
                    pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                    pricePointObj.Memo_No = genMemoObj.MemoNumber;
                    PPointManager.Save(pricePointObj);
                }
            }

            iTotalRow = gvNewMarkdown.Rows.Count;
            foreach (PriceGroup pgroupItem in _PriceGroupList)
            {
                for (iRow = 0; iRow < iTotalRow; iRow++)
                {
                    pricePointObj = new PricePoint();
                    pricePointObj.StyleNo = gvNewMarkdown.Rows[iRow].Cells[2].Text;
                    pricePointObj.BrandName = DDLBrand.SelectedValue;
                    pricePointObj.PGNo = pgroupItem.PGNo;
                    pricePointObj.Price_Type = genMemoObj.PriceType;
                    pricePointObj.Price = Convert.ToDecimal(gvNewMarkdown.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pgroupItem.PGNo));
                    pricePointObj.Date_Posted = genMemoObj.MemoDate;
                    pricePointObj.f_Date = genMemoObj.FromDate;
                    pricePointObj.t_Date = genMemoObj.ToDate;
                    pricePointObj.Group_No = Convert.ToInt32(DDLSubArea.SelectedItem.Value);
                    //pricePointObj.Group_No = genMemoObj.GroupNumber;
                    pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                    pricePointObj.Memo_No = genMemoObj.MemoNumber;
                    PPointManager.Save(pricePointObj);
                }
            }
        }
        private void SavePricePointByArea(IRMS.Entities.GeneralMemoConcession genMemoObj)
        {
            PricePointManager PPointManager = new PricePointManager();
            List<PriceGroup> _PriceGroupList = new List<PriceGroup>();
            _PriceGroupList = _PGManager.PriceGroupConcession();

            switch (genMemoObj.GroupNumber)
            {
                case 0:
                    {
                        _GroupAreaMemoManager.GroupAreaMemoByAllAreas();
                    }
                    break;
                case 99:
                    {
                        _GroupAreaMemoManager.GroupAreaMemoByAllProvinces();
                    }
                    break;
                default:
                    {
                        _GroupAreaMemoManager.GroupAreaMemoByAreaNumber(genMemoObj.GroupNumber);
                    }
                    break;
            }

            _GroupAreaMemoList = _GroupAreaMemoManager.GroupAreaMemoList;

            PricePoint pricePointObj;
            int iTotalRow = gvMarkdownList.Rows.Count;
            int iRow = 0;

            foreach (GroupAreaMemoClass gAreaMemo in _GroupAreaMemoList)
            {
                foreach (PriceGroup pgroupItem in _PriceGroupList)
                {
                    for (iRow = 0; iRow < iTotalRow; iRow++)
                    {
                        pricePointObj = new PricePoint();
                        pricePointObj.StyleNo = gvMarkdownList.Rows[iRow].Cells[2].Text;
                        pricePointObj.BrandName = genMemoObj.BrandName;
                        pricePointObj.PGNo = pgroupItem.PGNo;
                        pricePointObj.Price = Convert.ToDecimal(gvMarkdownList.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pgroupItem.PGNo));
                        pricePointObj.Price_Type = genMemoObj.PriceType;
                        pricePointObj.Date_Posted = genMemoObj.MemoDate;
                        pricePointObj.f_Date = genMemoObj.FromDate;
                        pricePointObj.Group_No = gAreaMemo.AreaGroupNo;
                        pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                        pricePointObj.Memo_No = genMemoObj.MemoNumber;
                        PPointManager.Save(pricePointObj);
                    }
                }
            }

            iTotalRow = gvNewMarkdown.Rows.Count;
            foreach (GroupAreaMemoClass gAreaMemo in _GroupAreaMemoList)
            {
                foreach (PriceGroup pgroupItem in _PriceGroupList)
                {
                    for (iRow = 0; iRow < iTotalRow; iRow++)
                    {
                        pricePointObj = new PricePoint();
                        pricePointObj.StyleNo = gvNewMarkdown.Rows[iRow].Cells[2].Text;
                        pricePointObj.BrandName = genMemoObj.BrandName;
                        pricePointObj.PGNo = pgroupItem.PGNo;
                        pricePointObj.Price = Convert.ToDecimal(gvNewMarkdown.Rows[iRow].Cells[5].Text) + Convert.ToDecimal(_PGManager.AddValueToRegularPrice(pgroupItem.PGNo));
                        pricePointObj.Price_Type = genMemoObj.PriceType;
                        pricePointObj.Date_Posted = genMemoObj.MemoDate;
                        pricePointObj.f_Date = genMemoObj.FromDate;
                        pricePointObj.Group_No = gAreaMemo.AreaGroupNo;
                        pricePointObj.Memo_ID = genMemoObj.RecordNumber;
                        pricePointObj.Memo_No = genMemoObj.MemoNumber;
                        PPointManager.Save(pricePointObj);
                    }
                }
            }
        }