public int DeleteCustomerAddress(int Id)
        {
            Vendor_DataModel obj_vendor = new Vendor_DataModel();
            List <KeyValuePair <string, string> > getByID_Parameters = new List <KeyValuePair <string, string> >();

            getByID_Parameters.Add(new KeyValuePair <string, string>("@Id", Convert.ToString(Id)));
            obj_vendor = JsonConvert.DeserializeObject <Vendor_DataModel>(CustomerAddressMaster.DeleteByID(getByID_Parameters));
            return(2);
        }
Esempio n. 2
0
        public Vendor_DataModel GetVendorById(int Id)
        {
            Vendor_DataModel obj_vendor = new Vendor_DataModel();
            List <KeyValuePair <string, string> > getByID_Parameters = new List <KeyValuePair <string, string> >();

            getByID_Parameters.Add(new KeyValuePair <string, string>("@Id", Convert.ToString(Id)));
            obj_vendor = JsonConvert.DeserializeObject <Vendor_DataModel>(obj_VendorDAL.GetByID(getByID_Parameters));
            return(obj_vendor);
        }
Esempio n. 3
0
        public int DeleteVendor(int VendorId)
        {
            Vendor_DataModel obj_vendor = new Vendor_DataModel();
            List <KeyValuePair <string, string> > getByID_Parameters = new List <KeyValuePair <string, string> >();

            getByID_Parameters.Add(new KeyValuePair <string, string>("@VendorId", Convert.ToString(VendorId)));
            obj_vendor = JsonConvert.DeserializeObject <Vendor_DataModel>(obj_VendorDAL.DeleteByID(getByID_Parameters));
            return(1);
        }
Esempio n. 4
0
 public Vendor_ViewModel()
 {
     vendor        = new Vendor_DataModel();
     lst_vendor    = new List <Vendor_DataModel>();
     vendorProduct = new VendorProduct_DataModel();
     lst_product   = new List <Product_DataModel>();
     lst_state     = new List <State_DataModel>();
     lst_gst       = new List <GST_DataModel>();
     lst_country   = new List <Spice.DataContarct.DataModel.Country_DataModel>();
 }
Esempio n. 5
0
        public string InsertVendor(Vendor_DataModel vendor)
        {
            string result = "";
            List <KeyValuePair <string, string> > insert_Parameters = new List <KeyValuePair <string, string> >();

            insert_Parameters.Add(new KeyValuePair <string, string>("@ID", Convert.ToString(vendor.Id)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@FirstName", vendor.FirstName));
            insert_Parameters.Add(new KeyValuePair <string, string>("@MiddleName", vendor.MiddleName));
            insert_Parameters.Add(new KeyValuePair <string, string>("@LastName", vendor.LastName));
            insert_Parameters.Add(new KeyValuePair <string, string>("@MobileNo", Convert.ToString(vendor.MobileNo)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@Email", vendor.Email));
            insert_Parameters.Add(new KeyValuePair <string, string>("@Address", vendor.Address));
            insert_Parameters.Add(new KeyValuePair <string, string>("@GST", Convert.ToString(vendor.GST)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@IsActive", Convert.ToString(vendor.IsActive)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@CountryId", Convert.ToString(vendor.CountryId)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@CityName", Convert.ToString(vendor.CityName)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@Address2", Convert.ToString(vendor.Address2)));
            insert_Parameters.Add(new KeyValuePair <string, string>("@StateName", Convert.ToString(vendor.StateName)));

            result = obj_VendorDAL.Insert(insert_Parameters);
            return(result);
        }