public VendorProduct_DataModel GetVendorProductById(int VendorProductId) { VendorProduct_DataModel obj_vendorProduct = new VendorProduct_DataModel(); List <KeyValuePair <string, string> > getByID_Parameters = new List <KeyValuePair <string, string> >(); getByID_Parameters.Add(new KeyValuePair <string, string>("@VendorProductId", Convert.ToString(VendorProductId))); obj_vendorProduct = JsonConvert.DeserializeObject <VendorProduct_DataModel>(obj_VendorDAL.GetVendorProductById(getByID_Parameters)); return(obj_vendorProduct); }
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>(); }
public string InsertVendorProduct(VendorProduct_DataModel vendorProduct) { string result = ""; List <KeyValuePair <string, string> > insert_Parameters = new List <KeyValuePair <string, string> >(); insert_Parameters.Add(new KeyValuePair <string, string>("@VendorProductId", Convert.ToString(vendorProduct.VendorProductId))); insert_Parameters.Add(new KeyValuePair <string, string>("@VendorId", Convert.ToString(vendorProduct.VendorId))); insert_Parameters.Add(new KeyValuePair <string, string>("@ProductId", Convert.ToString(vendorProduct.ProductId))); insert_Parameters.Add(new KeyValuePair <string, string>("@VendorPriority", Convert.ToString(vendorProduct.VendorPriority))); insert_Parameters.Add(new KeyValuePair <string, string>("@VendorPrice", Convert.ToString(vendorProduct.VendorPrice))); insert_Parameters.Add(new KeyValuePair <string, string>("@IsActive", Convert.ToString(vendorProduct.IsActive))); result = obj_VendorDAL.InsertVendorProduct(insert_Parameters); return(result); }