public static object SaveCustomsExpense(CustomsExpense scParam) { object data = new { }; CustomsExpense item = new CustomsExpense(); item.CustomsExpenseID = scParam.CustomsExpenseID; item.CustomsCompanyID = scParam.CustomsCompanyID; item.ExpenseTypeID = scParam.ExpenseTypeID; item.ExpensesCharge = scParam.ExpensesCharge; bool status = new CustomsExpensesManager().SaveItem(item); if ((item.ExpenseTypeID > 0 && item.CustomsCompanyID > 0) || status) { HttpContext.Current.Cache.Remove("CustomsExpenses"); data = new { Status = true, Message = Resources.AdminResources_ar.SuccessSave }; } else { data = new { Status = false, Message = Resources.AdminResources_ar.ErrorSave } }; return(data); }
public bool SaveItem(CustomsExpense item) { try { ctxWrite.CustomsExpenses_Save(item.CustomsExpenseID, item.CustomsCompanyID, item.ExpenseTypeID, item.ExpensesCharge); return(true); } catch { return(false); } }