protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { clsDesign objDesign = new clsDesign(); DataSet ds = new DataSet(); objDesign.Action = "ISELECT"; objDesign.DesignId = 0; ds = objDesign.fnDesign(); //divMain.InnerHtml = "<div id='divBG'><img src='/Design/" + ds.Tables[0].Rows[0]["ImagePath"].ToString() + "' id='imgMain' style='background-image: url(f3.jpg); background-repeat: repeat; width: 100%; background-size: 200px;' /></div>"; ddlFabric.DataTextField = "CategoryName"; ddlFabric.DataValueField = "CategoryId"; ddlFabric.DataSource = ds.Tables[1]; ddlFabric.DataBind(); ViewState["dtFabric"] = ds.Tables[2]; ddlFabric_SelectedIndexChanged(null, null); //color(); } //string htm = string.Empty; //for (int i = 0; i < ds.Tables[3].Rows.Count; i++) //{ // htm += "<div class='col-md-2 col-sm-4 col-lg-2 col-xs-4'><p onclick='fillPallet(this)' style='font-size:1px; height:10px; background-color:" + ds.Tables[3].Rows[i]["ColorHex"].ToString() + "; color:" + ds.Tables[3].Rows[i]["ColorHex"].ToString() + ";'>" + ds.Tables[3].Rows[i]["ColorHex"].ToString() + "<p></div>"; //} //divColorChart.InnerHtml = htm; }
public ucDesign(clsDesign designSelected) { InitializeComponent(); designClass = designSelected; //templateId = Guid.NewGuid(); templateId = designSelected.designId; countSaveClick = 1; rvm = new rightMenuViewModel(); controlCreator = new createControl(); listViewDesignBgClass = new clsListViewDesignBackground(); controlCollection = new clsControls(); textBlockCollection = new clsTextblocks(); imageCollection = new clsImages(); buttonCollection = new clsButtons(); textBoxCollection = new clsTextBoxes(); comboboxCollection = new clsComboBoxes(); datePickerCollection = new clsDatePickers(); buttonActionClass = new clsButtonAction(); Switcher.pageSwitcher = this; dictionaryForFieldNameAndInputType = new Dictionary <string, string>(); dictionaryForComboboxItem = new Dictionary <string, List <string> >(); dictionaryInputDatatype = new Dictionary <string, string>(); dictionaryForFieldNameAndId = new Dictionary <string, int>(); //clsXmlInteraction.createFirstXml(templateId); loadDesignedTemplate(); tbDescription.Text = designSelected.description; DataContext = this; }
private void fillDesigns() { DataSet ds = new DataSet(); clsDesign objDesign = new clsDesign(); objDesign.Action = "SELECT"; ds = objDesign.fnDesign(); ViewState["dt"] = ds.Tables[0]; divDesigns.InnerHtml = fillImg(ds.Tables[0]); }
private void Parameters(string Action, int DesignId) { try { if (txtDesignName.Text != "") { clsDesign objDesign = new clsDesign(); DataSet ds = new DataSet(); objDesign.Action = Action; objDesign.DesignId = DesignId; objDesign.DesignName = txtDesignName.Text; objDesign.Description = txtDescription.Text; objDesign.ImagePath = ""; if (FileUpload1.HasFile) { var _with1 = HttpContext.Current; string strPath = _with1.Server.MapPath("../../Design/"); HttpPostedFile postedFile = FileUpload1.PostedFile; string filename = postedFile.FileName; string fileExt1 = System.IO.Path.GetExtension(filename).Replace(".", ""); fileExt1 = System.IO.Path.GetExtension(filename).Replace(".", ""); filename = filename.Replace("." + fileExt1, ""); filename = filename + "1" + string.Format("{0:MMddyyyyhhmmssfffffftt}", DateTime.Now) + "." + fileExt1.ToString(); postedFile.SaveAs(strPath + filename); objDesign.ImagePath = filename; } ds = objDesign.fnDesign(); if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0) { divAlert.Visible = true; divAlert.InnerHtml = ds.Tables[0].Rows[0]["MSG"].ToString(); } else { divAlert.Visible = true; divAlert.InnerHtml = "Something went wrong"; } fillGrid(); clear(); } else { divAlert.Visible = true; divAlert.InnerHtml = "Enter all required fileds"; } } catch (Exception ex) { Response.Write(ex.ToString()); } }
private void fillGrid() { try { clsDesign objDesign = new clsDesign(); DataSet ds = new DataSet(); objDesign.Action = "SELECT"; ds = objDesign.fnDesign(); gvDesign.DataSource = ds; gvDesign.DataBind(); ViewState["dt"] = ds.Tables[0]; } catch (Exception ex) { } }
private void fillMain() { DataSet ds = new DataSet(); clsDesign objDesign = new clsDesign(); objDesign.Action = "TOP6"; ds = objDesign.fnDesign(); ViewState["dt"] = ds.Tables[0]; string htm = string.Empty; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { htm += "<div class='col-md-4 '><a href='Lending.aspx?val=" + ds.Tables[0].Rows[i]["DesignId"].ToString() + "'><img class='img-thumbnail' src='/Design/" + ds.Tables[0].Rows[i]["ImagePath"].ToString() + "'><br><center><p style='font-weight:bold;'>" + ds.Tables[0].Rows[i]["DesignName"].ToString() + "</center></p></a></div>"; } divMain.InnerHtml = htm; }
private void OnComponentClick(clsDesign designSelected) { ucDesign ud = new ucDesign(designSelected); ud.ShowDialog(); }