//public List<CustomsInvoices_SelectRowResult> GetCustomsInvoice(string param) //{ // string sql = string.Format(@"SELECT * FROM View_CustomsInvoices Where IsDeleted=0 {0} ORDER BY CustomsInvoiceID DESC", param); // return ctxWrite.ExecuteQuery<CustomsInvoices_SelectRowResult>(sql).ToList(); //} //public ICustomsInvoiceProperties GetCustomsInvoicesProperties() //{ // var result = ctxWrite.CustomsInvoices_SelectProperties(); // ICustomsInvoiceProperties items = new ICustomsInvoiceProperties(); // items.CustomsingCompanies = result.GetResult<ICustomsingCompanies>().ToList(); // items.ChassisNo = result.GetResult<IChassisNo>().ToList(); // items.Distinations = result.GetResult<IDistinations>().ToList(); // return items; //} #endregion #region "Write Methods" public int SaveItem(CustomsInvoice item) { try { return(ctxWrite.CustomsInvoices_Save(item.CustomsInvoiceID, item.InvoiceDate, item.CustomsCompanyID, item.CustomsPrice, item.InvoiceNo, item.ContainerNo, item.Notes, item.IsDeleted, item.TotalCustoms, item.TotalExpenses, item.TotalAmount)); } catch { return(-1); } }
public static object SaveInvoice(CustomsInvoice scParam) { object data = new { }; var status = new CustomsInvoicesManager().SaveItem(scParam); if (status > 0) { data = new { Status = true, ID = status, Message = Resources.AdminResources_ar.SuccessSave }; } else { data = new { Status = false, ID = 0, Message = Resources.AdminResources_ar.ErrorSave } }; return(data); }