public List <ProductBusinessModal> getCPDoaminPriceList(int cPId, string categeory) { SqlCommand dinsert = new SqlCommand("usp_GetCPCDomainPriceList"); dinsert.Parameters.AddWithValue("@CustId", SqlDbType.Int).Value = cPId; dinsert.Parameters.AddWithValue("@Cat", SqlDbType.VarChar).Value = categeory; DataSet dtList = objcon.GetDsByCommand(dinsert); List <ProductBusinessModal> list1 = new List <ProductBusinessModal>(); foreach (DataRow dr in dtList.Tables[0].Rows) { ProductBusinessModal pd = new ProductBusinessModal(); // BankDetails list1 = new BankDetails(); //pd.ProductId = Convert.ToInt32(dr["ProductId"].ToString()); pd.ProductCode = dr["ProductCode"].ToString(); pd.ProductName = dr["ProductName"].ToString(); //pd.ProductCatId = Convert.ToInt32(dr["ProductCatId"].ToString()); //pd.DomainERPCode = dr["DomainERPCode"].ToString(); //pd.DomainProviderCode = dr["DomainProviderCode"].ToString(); //pd.SACCode = dr["SACCode"].ToString(); pd.RegistrartionPrice = (dr["RegistrartionPrice"].ToString()); pd.RenewalPrice = (dr["RenewalPrice"].ToString()); pd.TransferPrice = (dr["TransferPrice"].ToString()); pd.DomainregistrationPrice = (dr["DomainregistrationPrice"].ToString()); pd.PropductImage = (dr["PropductImage"].ToString()); pd.CPName = (dr["CustName"].ToString()); pd.CostPrice = (dr["CostPrise"].ToString()); pd.SellingPrice = (dr["SellingPrise"].ToString()); list1.Add(pd); } return(list1); }
public ProductBusinessModal getProductById(int productId) { SqlCommand dinsert = new SqlCommand("usp_GetProductById"); dinsert.Parameters.AddWithValue("@ProductId", SqlDbType.Int).Value = productId; DataSet DsList = objcon.GetDsByCommand(dinsert); ProductBusinessModal List = new ProductBusinessModal(); if (DsList.Tables[0].Rows.Count > 0) { if (DsList.Tables[0].Rows[0] != null) { List.ProductId = Convert.ToInt32(DsList.Tables[0].Rows[0]["ProductId"]); List.ProductCode = (DsList.Tables[0].Rows[0]["ProductCode"].ToString()); List.ProductName = DsList.Tables[0].Rows[0]["ProductName"].ToString(); List.DomainERPCode = DsList.Tables[0].Rows[0]["DomainERPCode"].ToString(); List.DomainProviderCode = DsList.Tables[0].Rows[0]["DomainProviderCode"].ToString(); List.SACCode = DsList.Tables[0].Rows[0]["SACCode"].ToString(); List.RegistrartionPrice = (DsList.Tables[0].Rows[0]["RegistrartionPrice"].ToString()); List.RenewalPrice = (DsList.Tables[0].Rows[0]["RenewalPrice"].ToString()); List.TransferPrice = (DsList.Tables[0].Rows[0]["TransferPrice"].ToString()); List.DomainregistrationPrice = (DsList.Tables[0].Rows[0]["DomainregistrationPrice"].ToString()); } } return(List); }
public ActionResult AddDomain(int ProductId) { ProductBusinessModal Pd = new ProductBusinessModal(); Pd.ProductId = ProductId; return(View(Pd)); }
public List <ProductBusinessModal> getCpProdcutList(int ProductId) { SqlCommand dinsert = new SqlCommand("usp_GetProduct"); dinsert.Parameters.AddWithValue("@ProductCatId", SqlDbType.Int).Value = ProductId; DataSet dtList = objcon.GetDsByCommand(dinsert); List <ProductBusinessModal> list = new List <ProductBusinessModal>(); foreach (DataRow dr in dtList.Tables[0].Rows) { ProductBusinessModal list1 = new ProductBusinessModal(); list1.ProductCode = dr["ProductCode"].ToString(); list1.ProductName = dr["ProductName"].ToString(); list1.DomainregistrationPrice = dr["DomainregistrationPrice"].ToString(); list1.TransferPrice = dr["TransferPrice"].ToString(); list.Add(list1); } return(list); }
public List <ProductBusinessModal> getDomainForHomepageSlider(int cPId) { SqlCommand dinsert = new SqlCommand("usp_getDoaminForStoreFrontHomePage"); dinsert.Parameters.AddWithValue("@CustId", SqlDbType.Int).Value = cPId; DataSet dtList = objcon.GetDsByCommand(dinsert); List <ProductBusinessModal> list1 = new List <ProductBusinessModal>(); foreach (DataRow dr in dtList.Tables[0].Rows) { ProductBusinessModal pd = new ProductBusinessModal(); pd.ProductName = dr["ProductName"].ToString(); pd.RegistrartionPrice = dr["RegistrartionPrice"].ToString(); // pd.ProductCatId = Convert.ToInt32(dr["ProductCatId"].ToString()); list1.Add(pd); } return(list1); }
public int setDomain(ProductBusinessModal pd) { SqlCommand dinsert = new SqlCommand("usp_SetProduct"); dinsert.Parameters.AddWithValue("@ProductId", SqlDbType.Int).Value = pd.ProductId; if (pd.ProductName.ToString() != null) { dinsert.Parameters.AddWithValue("@ProductName", SqlDbType.VarChar).Value = pd.ProductName; } dinsert.Parameters.AddWithValue("@ProductCatId", SqlDbType.Int).Value = 1; if (!string.IsNullOrWhiteSpace(pd.DomainERPCode)) { dinsert.Parameters.AddWithValue("@DomainERPCode", SqlDbType.VarChar).Value = pd.DomainERPCode; } if (!string.IsNullOrWhiteSpace(pd.DomainProviderCode)) { dinsert.Parameters.AddWithValue("@DomainProviderCode", SqlDbType.VarChar).Value = pd.DomainProviderCode; } if (!string.IsNullOrWhiteSpace(pd.SACCode)) { dinsert.Parameters.AddWithValue("@SACCode", SqlDbType.VarChar).Value = pd.SACCode; } dinsert.Parameters.AddWithValue("@RegistrartionPrice", SqlDbType.Decimal).Value = Convert.ToDecimal(pd.RegistrartionPrice); dinsert.Parameters.AddWithValue("@TransferPrice", SqlDbType.Decimal).Value = Convert.ToDecimal(pd.TransferPrice); dinsert.Parameters.AddWithValue("@RenewalPrice", SqlDbType.Decimal).Value = Convert.ToDecimal(pd.RenewalPrice); dinsert.Parameters.AddWithValue("@DomainregistrationPrice", SqlDbType.Decimal).Value = Convert.ToDecimal(pd.DomainregistrationPrice); if (!string.IsNullOrWhiteSpace(pd.PropductImage)) { dinsert.Parameters.AddWithValue("@PropductImage", SqlDbType.VarChar).Value = pd.PropductImage; } var Result = objcon.GetExcuteScaler(dinsert); return(Result); }
public ActionResult SetDomain(ProductBusinessModal Pd, HttpPostedFileBase[] postedFile) { foreach (HttpPostedFileBase file in postedFile) { if (file != null) { var filename = Path.GetFileName(file.FileName); // var filename1 = Path.GetFileName(file.FileName); Pd.PropductImage = Convert.ToString(Path.GetFileName(file.FileName)); if (filename != null) { var Type = 0; var filePath = Server.MapPath("~/Documents/ProductImage/" + filename); file.SaveAs(filePath); // var UploadDocument = objPartnerBAL.SaveUploadChennelPartnerDoc(filename1, EventsTitleList, Type); } } } var Res = objPartnerBAL.SetDomain(Pd); return(RedirectToAction("Domain", "Product")); }
public int SetDomain(ProductBusinessModal pd) { return(objInfPub.setDomain(pd)); }