public JsonResult GetDataSupplier(uint id) { Supplier client = SuppliersProvider.GetSupplierById(id); string JsonDataSupplier = JsonConvert.SerializeObject(client); return(Json(JsonDataSupplier)); }
public bool DeleteSupplier(uint id) { bool success = true; try { SuppliersProvider.DeleteSupplier(id); } catch { success = false; } return(success); }
protected void Page_Load(object sender, EventArgs e) { DataTable dt; var reportPath = new ReportPath(); var reportParameter = new ReportParameter(); var reportDocument = new ReportDocument(); int reportType = Request.QueryString["ReportType"].Toint(); DateTime fromDate = Request.QueryString["fromDate"].ToDate(); DateTime toDate = Request.QueryString["toDate"].ToDate(); DateTime aDate = Request.QueryString["aDate"].ToDate(); int reportOption = Request.QueryString["reportOption"].Toint(); int reportCategory = Request.QueryString["reportCategory"].Toint(); int vatRegID = Request.QueryString["VatRegID"].Toint(); int productID = Request.QueryString["productID"].Toint(); int warehouseID = Request.QueryString["warehouseID"].Toint(); var transactionID = Request.QueryString["transactionNo"]; string printOption = Request.QueryString["printOption"]; //******** Updated Datetime ********// DateTime?fDate; DateTime?tDate; DateTime?adate; int? vatRegiID; int? warehouseid; int? productid; int? reportoption; int? reportcategory; string transactionid; switch (reportType) { #region Supplier Report case ReportType.SupplierReport: var supplierProvider = new SuppliersProvider(); int supplierTypeID = Request.QueryString["SupplierTypeID"].ToInt(); dt = supplierProvider.GetSupplierInfoByTypeID(supplierTypeID); if (dt != null && dt.Rows.Count > 0) { reportDocument.Load(reportPath.SupplierReportPath); GetValue(dt, reportParameter, reportDocument); } else { GetMsg(reportParameter, reportDocument, reportPath); } break; #endregion } }
public bool UpdateSupplier(uint id, uint cuit, string surname = "", string name = "", string mail = "", string telephone = "", string cellphone = "", string address = "", string company = "", string fanciful_name = "") { bool success = true; Supplier client = new Supplier(id, cuit, name, surname, mail, cellphone, telephone, address, company, fanciful_name); try { SuppliersProvider.UpdateSupplier(client); } catch { success = false; } return(success); }
public bool CreateSupplier(uint cuit, string surname = "", string name = "", string mail = "", string telephone = "", string cellphone = "", string address = "", string company = "", string fanciful_name = "") { bool success; Supplier NewSupplier = new Supplier(cuit, name, surname, mail, cellphone, telephone, address, company, fanciful_name); try { success = SuppliersProvider.InsertSupplier(NewSupplier); } catch { success = false; } return(success); }
//Suppliers public ActionResult SuppliersCRUD() { ViewBag.Suppliers = SuppliersProvider.GetSuppliers(); return(View()); }
public ActionResult CreatePurchase() { ViewBag.Suppliers = SuppliersProvider.GetSuppliers(); return(View()); }