protected void lnSubTypeSubType2_Click(object sender, EventArgs e) { int lookupsubtypeid = Int32.Parse(lstSubType_Type.SelectedValue); int lookupsubtypeid2 = (lstSubType_Type.SelectedIndex) + 2; int i = 0, uppervalue = 0; foreach (ListItem item in lstSubType_Type.Items) { i++; if (i == lookupsubtypeid2) { uppervalue = Convert.ToInt32(item.Value); break; } } LookupsManagement.GetLookupSubTypeSwapedData(lookupsubtypeid, uppervalue); lstSubType_Type_SelectedIndexChanged(null, null); try { this.lstSubType_Type.SelectedIndex = -1; this.txtSubType_TypeDes.Text = ""; txtSubType_Type.Text = ""; } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "", ex); } }
protected void LinkButton2_Click(object sender, EventArgs e) { int lookupsubtypeid = Int32.Parse(lstSubType_Type.SelectedValue); int lookupsubtypeid2 = (lstSubType_Type.SelectedIndex) + 2; int i = 0, uppervalue = 0; foreach (ListItem item in lstSubType_Type.Items) { i++; if (i == lookupsubtypeid2) { uppervalue = Convert.ToInt32(item.Value); break; } } LookupsManagement.GetLookupSubTypeSwapedData(lookupsubtypeid, uppervalue); lstSubType_SelectedIndexChanged(null, null); //lstvalue.DataValueField = "ID"; //lstvalue.DataTextField = "Name"; //lstvalue.Items.Clear(); //DataSet ds = null; //ds = LookupsManagement.GetLookupsData(Convert.ToInt32(ddllookupstable.SelectedValue), -1); //lstvalue.DataSource = ds.Tables[0]; //lstvalue.DataBind(); try { this.lstSubType_Type.SelectedIndex = -1; this.txtSubType_TypeDes.Text = ""; txtSubType_Type.Text = ""; //divadd.Style.Add("display", "inline"); //divupdate.Style.Add("display", "none"); //// divdelete.Style.Add("display", "none"); //divCancel.Style.Add("display", "none"); //ImageButton1.Visible = false; //ImageButton2.Visible = false; } catch (Exception ex) { new SqlLog().InsertSqlLog(0, "", ex); } }