protected void lnkbtnAddMore_Click(object sender, EventArgs e) { lnkbtnAddSetting.Visible = true; lnkbtnAddMore.Visible = false; lnkbtnCancelSetting.Visible = true; // ddlstakeholderTypeListfooter.Visible = true; ddlTireSizeListfooter.Visible = true; txteffectivedatefooter.Visible = true; txtexpirationdatefooter.Visible = true; txtDollarValuefooter.Visible = true; //System.Data.SqlClient.SqlParameter[] prm; //prm = new System.Data.SqlClient.SqlParameter[1]; //prm[0] = new System.Data.SqlClient.SqlParameter("@OrganizationTypeId", Convert.ToInt32(OrganizationType.Stakeholder)); // Utils.GetLookUpData<DropDownList>(ref ddlstakeholderTypeListfooter, LookUps.LoadStakeholderTypes, LanguageId); ddlTireSizeListfooter.Items.Clear(); ddlTireSizeListfooter.DataValueField = "SizeId"; ddlTireSizeListfooter.DataTextField = "TireSize"; ddlTireSizeListfooter.DataSource = PTE.GetAllSizes(); ddlTireSizeListfooter.DataBind(); ddlTireSizeListfooter.Items.Insert(0, new ListItem(ResourceMgr.GetMessage("Select"), "0")); ScriptManager.RegisterStartupScript(this, GetType(), "AddDataPickerFooter", "SetDatePicket();", true); }
protected void Button1_Click(object sender, EventArgs e) { TextBox3.Text = DateTime.ParseExact(TextBox1.Text, "dd/MM/yyyy", CultureInfo.CurrentCulture).ToString("MM/dd/yyyy"); TextBox4.Text = DateTime.ParseExact(TextBox2.Text, "dd/MM/yyyy", CultureInfo.CurrentCulture).ToString("MM/dd/yyyy"); PTE.DataBind(); GridView1.DataBind(); }
//private void LoadAllSetting() //{ // loadGridAndHeaderText(); //} protected void gvSetting_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.Footer) { //DropDownList ddlStakeholderTypeFooter = e.Row.FindControl("ddlstakeholderTypeListfooter") as DropDownList; ////System.Data.SqlClient.SqlParameter[] prm = new System.Data.SqlClient.SqlParameter[1]; ////prm[0] = new System.Data.SqlClient.SqlParameter("@OrganizationTypeId", Convert.ToInt32(OrganizationType.Stakeholder)); //Utils.GetLookUpData<DropDownList>(ref ddlStakeholderTypeFooter, LookUps.LoadStakeholderTypes, LanguageId); //int index = ddlStakeholderTypeFooter.Items.IndexOf(ddlStakeholderTypeFooter.Items.FindByText("Stewardship ")); //if (index > -1) //{ // ddlStakeholderTypeFooter.Items.RemoveAt(index); //} DropDownList ddlTireSizeListeditor = e.Row.FindControl("ddlTireSizeListfooter") as DropDownList; ddlTireSizeListeditor.Items.Clear(); ddlTireSizeListeditor.DataValueField = "SizeId"; ddlTireSizeListeditor.DataTextField = "TireSize"; ddlTireSizeListeditor.DataSource = PTE.GetAllSizes(); ddlTireSizeListeditor.DataBind(); ddlTireSizeListeditor.Items.Insert(0, new ListItem(ResourceMgr.GetMessage("Select"), "0")); } if (e.Row.RowType == DataControlRowType.DataRow && e.Row.RowIndex == gvSetting.EditIndex) { //DropDownList ddlStakeholderTypeeditor = e.Row.FindControl("ddlstakeholderTypeListeditor") as DropDownList; //System.Data.SqlClient.SqlParameter[] prm = new System.Data.SqlClient.SqlParameter[1]; //prm[0] = new System.Data.SqlClient.SqlParameter("@OrganizationTypeId", Convert.ToInt32(OrganizationType.Stakeholder)); //Utils.GetLookUpData<DropDownList>(ref ddlStakeholderTypeeditor, LookUps.LoadStakeholderTypes, LanguageId); //int index = ddlStakeholderTypeeditor.Items.IndexOf(ddlStakeholderTypeeditor.Items.FindByText("Stewardship ")); //if (index > -1) //{ // ddlStakeholderTypeeditor.Items.RemoveAt(index); //} //HiddenField hdnOrganizationSubTypeId = e.Row.FindControl("hdnOrganizationSubTypeId") as HiddenField; //ddlStakeholderTypeeditor.SelectedValue = hdnOrganizationSubTypeId.Value; DropDownList ddlTireSizeListeditor = e.Row.FindControl("ddlTireSizeListeditor") as DropDownList; ddlTireSizeListeditor.Items.Clear(); ddlTireSizeListeditor.DataValueField = "SizeId"; ddlTireSizeListeditor.DataTextField = "TireSize"; ddlTireSizeListeditor.DataSource = PTE.GetAllSizes(); ddlTireSizeListeditor.DataBind(); ddlTireSizeListeditor.Items.Insert(0, new ListItem(ResourceMgr.GetMessage("Select"), "0")); HiddenField hdnSizeId = e.Row.FindControl("hdnSizeId") as HiddenField; ddlTireSizeListeditor.SelectedValue = hdnSizeId.Value; } }