public ActionResult GetInfoByCaseCode(string p_case_code)
        {
            try
            {
                SearchObject_BL            _bl = new SearchObject_BL();
                List <Billing_Detail_Info> _lst_billing_detail  = new List <Billing_Detail_Info>();
                SearchObject_Header_Info   objSearch_HeaderInfo = _bl.GetBilling_By_Case_Code(p_case_code, SessionData.CurrentUser.Username,
                                                                                              AppsCommon.GetCurrentLang(), ref _lst_billing_detail);
                ViewBag.objSearch_HeaderInfo = objSearch_HeaderInfo;

                if (objSearch_HeaderInfo == null)
                {
                    return(Json(new { success = -1 }));
                }

                // chỉ lấy những thằng nào mà > đã nộp đơn lên cục
                //if (objSearch_HeaderInfo != null && objSearch_HeaderInfo.Status < (decimal)Common.CommonData.CommonEnums.App_Status.DaNopDon)
                //{
                //    return Json(new { success = -2 });
                //}

                Billing_Detail_Info _ChiPhiKhac = new Billing_Detail_Info();
                _ChiPhiKhac.Nation_Fee            = 0;
                _ChiPhiKhac.Represent_Fee         = 0;
                _ChiPhiKhac.Service_Fee           = 0;
                _ChiPhiKhac.Biling_Detail_Name    = "Chi phí khác";
                _ChiPhiKhac.Biling_Detail_Name_EN = "Others";
                _ChiPhiKhac.Type = Convert.ToDecimal(Common.CommonData.CommonEnums.Billing_Detail_Type.Others);
                _lst_billing_detail.Add(_ChiPhiKhac);

                foreach (Billing_Detail_Info item in _lst_billing_detail)
                {
                    item.Total_Fee = item.Nation_Fee + item.Represent_Fee + item.Service_Fee;
                }

                SessionData.SetDataSession(p_case_code, _lst_billing_detail);
                SessionData.SetDataSession(p_case_code + "_CURRENCY_TYPE", objSearch_HeaderInfo.Currency_Type);

                ViewBag.List_Billing  = _lst_billing_detail;
                ViewBag.Operator_Type = Convert.ToDecimal(Common.CommonData.CommonEnums.Operator_Type.Insert);
                ViewBag.App_Case_Code = p_case_code;
                ViewBag.Currency_Type = objSearch_HeaderInfo.Currency_Type;
                ViewBag.ShowPopUp     = 0;

                var Partial_AppInfo = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Manager/Views/Billing_Search/_Partial_SearchInfo.cshtml");
                var PartialDetail_Insert_Billing = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Manager/Views/Billing_Search/_PartialDetail_Insert_Billing.cshtml");

                var json = Json(new { success = 1, Partial_AppInfo, PartialDetail_Insert_Billing });
                return(json);
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(PartialView("~/Areas/TradeMark/Views/Shared/_PartialThongTinChuDon.cshtml"));
            }
        }
        public ActionResult doDeleteBillingDetail(string p_case_code, decimal p_Ref_Id, decimal p_Type, decimal p_ShowPopUp)
        {
            try
            {
                List <Billing_Detail_Info> _lst_billing_detail = Get_LstFee_Detail(p_case_code);

                if (_lst_billing_detail.Count > 0)
                {
                    _lst_billing_detail.RemoveAll(x => x.Ref_Id == p_Ref_Id);
                }

                if (_lst_billing_detail.Count == 0)
                {
                    Billing_Detail_Info _ChiPhiKhac = new Billing_Detail_Info();
                    _ChiPhiKhac.Nation_Fee            = 0;
                    _ChiPhiKhac.Represent_Fee         = 0;
                    _ChiPhiKhac.Service_Fee           = 0;
                    _ChiPhiKhac.Biling_Detail_Name    = "Chi phí khác";
                    _ChiPhiKhac.Biling_Detail_Name_EN = "Others";
                    _ChiPhiKhac.Type = Convert.ToDecimal(Common.CommonData.CommonEnums.Billing_Detail_Type.Others);
                    _lst_billing_detail.Add(_ChiPhiKhac);
                }

                foreach (Billing_Detail_Info item in _lst_billing_detail)
                {
                    item.Total_Fee = item.Nation_Fee + item.Represent_Fee + item.Service_Fee;
                }

                SessionData.SetDataSession(p_case_code, _lst_billing_detail);

                ViewBag.App_Case_Code = p_case_code;
                ViewBag.List_Billing  = _lst_billing_detail;
                ViewBag.ShowPopUp     = p_ShowPopUp;
                string _Currency_Type = (string)SessionData.GetDataSession(p_case_code + "_CURRENCY_TYPE");
                if (_Currency_Type != null)
                {
                    ViewBag.Currency_Type = _Currency_Type;
                }

                return(PartialView("~/Areas/Manager/Views/Billing_Search/_PartialDetail_Insert_Billing.cshtml"));
            }
            catch (Exception ex)
            {
                Logger.LogException(ex);
                return(PartialView("~/Areas/Manager/Views/Billing_Search/_PartialDetail_Insert_Billing.cshtml"));
            }
        }