コード例 #1
0
        public JsonResult GetDataSupplier(uint id)
        {
            Supplier client           = SuppliersProvider.GetSupplierById(id);
            string   JsonDataSupplier = JsonConvert.SerializeObject(client);

            return(Json(JsonDataSupplier));
        }
コード例 #2
0
        public bool DeleteSupplier(uint id)
        {
            bool success = true;

            try
            {
                SuppliersProvider.DeleteSupplier(id);
            }
            catch
            {
                success = false;
            }
            return(success);
        }
コード例 #3
0
        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
            }
        }
コード例 #4
0
        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);
        }
コード例 #5
0
        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);
        }
コード例 #6
0
 //Suppliers
 public ActionResult SuppliersCRUD()
 {
     ViewBag.Suppliers = SuppliersProvider.GetSuppliers();
     return(View());
 }
コード例 #7
0
 public ActionResult CreatePurchase()
 {
     ViewBag.Suppliers = SuppliersProvider.GetSuppliers();
     return(View());
 }