public ActionResult GetFee(ApplicationHeaderInfo pInfo, App_Detail_PLD01_HDCN_Info pDetail, List <AppFeeFixInfo> pFeeFixInfo) { try { List <AppFeeFixInfo> _lstFeeFix = Call_Fee.CallFee_D01(pDetail, pFeeFixInfo); ViewBag.LstFeeFix = _lstFeeFix; } catch (Exception ex) { Logger.LogException(ex); } var PartialTableListFees = AppsCommon.RenderRazorViewToString(this.ControllerContext, "~/Areas/Patent/Views/Shared/_PartialTableListFees.cshtml"); var json = Json(new { success = 1, PartialTableListFees }); return(json); }
public ActionResult Translate_PLD01_HDCN_4C2(ApplicationHeaderInfo pInfo, App_Detail_PLD01_HDCN_Info pDetail, List <AppDocumentInfo> pAppDocumentInfo, List <AppFeeFixInfo> pFeeFixInfo) { try { Application_Header_BL objBL = new Application_Header_BL(); AppFeeFixBL objFeeFixBL = new AppFeeFixBL(); App_Detail_PLD01_HDCN_BL objDetail_BL = new App_Detail_PLD01_HDCN_BL(); AppDocumentBL objDoc = new AppDocumentBL(); if (pInfo == null || pDetail == null) { return(Json(new { status = ErrorCode.Error })); } string language = ""; if (pInfo.Languague_Code == Language.LangVI) { language = Language.LangEN; } else { language = Language.LangVI; } var CreatedBy = SessionData.CurrentUser.Username; var CreatedDate = SessionData.CurrentUser.CurrentDate; decimal pReturn = ErrorCode.Success; int pAppHeaderID = 0; decimal pIDHeaderoot = pInfo.Id; string prefCaseCode = ""; using (var scope = new TransactionScope()) { // pInfo.Languague_Code = language; if (pInfo.Created_By == null || pInfo.Created_By == "0" || pInfo.Created_By == "") { pInfo.Created_By = CreatedBy; } pInfo.Created_Date = CreatedDate; pInfo.Send_Date = DateTime.Now; //TRA RA ID CUA BANG KHI INSERT if (pInfo.Id_Vi > 0) { pInfo.Modify_By = CreatedBy; pInfo.Modify_Date = CreatedDate; pAppHeaderID = objBL.AppHeaderUpdate(pInfo); } else { //TRA RA ID CUA BANG KHI INSERT pInfo.Created_By = CreatedBy; pInfo.Created_Date = CreatedDate; pAppHeaderID = objBL.AppHeaderInsert(pInfo, ref prefCaseCode); } // detail if (pAppHeaderID >= 0) { pDetail.Appcode = pInfo.Appcode; pDetail.Language_Code = language; pDetail.App_Header_Id = pAppHeaderID; pDetail.Case_Code = prefCaseCode; pReturn = objDetail_BL.Insert(pDetail); if (pReturn <= 0) { goto Commit_Transaction; } } else { goto Commit_Transaction; } #region Phí cố định List <AppFeeFixInfo> _lstFeeFix = Call_Fee.CallFee_D01(pDetail, pFeeFixInfo); AppFeeFixBL _AppFeeFixBL = new AppFeeFixBL(); pReturn = _AppFeeFixBL.AppFeeFixInsertBath(_lstFeeFix, prefCaseCode); #endregion #region Tai lieu dinh kem if (pReturn >= 0 && pAppDocumentInfo != null) { if (pAppDocumentInfo.Count > 0) { pReturn = objDoc.AppDocumentTranslate(language, pIDHeaderoot, pAppHeaderID); } } else { goto Commit_Transaction; } #endregion //end Commit_Transaction: if (pReturn < 0) { Transaction.Current.Rollback(); } else { scope.Complete(); } } return(Json(new { status = pAppHeaderID })); } catch (Exception ex) { Logger.LogException(ex); return(Json(new { status = ErrorCode.Error })); } }