//UserRights_BL bal = new UserRights_BL(); /* Create the object for accessing the services * this object is mainly used for accessing the service routines * */ //IeLogService_INFClient objsys = Global.Client; protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { Session["System_parameter"] = "1"; BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); try { GetModules(); // SysPar_BAL obj = new SysPar_BAL(); ddlModuleTable.DataSource = objsys.GetModulesTable(); ddlModuleTable.DataTextField = "name"; ddlModuleTable.DataValueField = "name"; ddlModuleTable.DataBind(); } catch (Exception ex) { //ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } } else { CallProperListUpdate(Request.Params.Get("__EVENTTARGET")); } }
protected void imgLevel4Search_Click(object sender, EventArgs e) { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); DataSet ds = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel3.SelectedValue, ddlActive4.SelectedValue); if (txtSearchLevel4.Text != "") { ds.Tables[0].DefaultView.RowFilter = "name Like '%" + txtSearchLevel4.Text.Trim() + "%'"; LsbLevel4.DataSource = ds.Tables[0].DefaultView.ToTable(); } else { LsbLevel4.DataSource = ds.Tables[0]; } LsbLevel4.DataTextField = "name"; LsbLevel4.DataValueField = "code"; LsbLevel4.DataBind(); LsbLevel4.Focus(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); }
protected void imgModuleSearch_Click(object sender, EventArgs e) { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); DataSet ds = objsys.GetModules(Int32.Parse(ddlModule.SelectedValue)); if (txtSearchModule.Text != "") { ds.Tables[0].DefaultView.RowFilter = "module Like '%" + txtSearchModule.Text.Trim() + "%'"; lsbModule.DataSource = ds.Tables[0].DefaultView.ToTable(); } else { lsbModule.DataSource = ds.Tables[0]; } lsbModule.DataTextField = "module"; lsbModule.DataValueField = "tablename"; lsbModule.DataBind(); LsbLevel1.Items.Clear(); LsbLevel2.Items.Clear(); LsbLevel3.Items.Clear(); LsbLevel4.Items.Clear(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); }
protected void btnModOK_Click(object sender, EventArgs e) { //SysPar_BAL obj = new SysPar_BAL(); BLL_Infra_SysParamater objService = new BLL_Infra_SysParamater(); { try { int status = 0; if (mActiveYes.Checked) { status = 1; } int stat = objService.insertSysModule(txtModulename.Text, ddlModuleTable.SelectedValue, Int32.Parse(Session["userid"].ToString()), status); EnabledisableAllControl(false); GetModules(); if (stat == -1) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Success", "alert('Module Successfully added');", true); } else { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Failed", "alert('An error occured while adding please try later');", true); } } catch (Exception ex) { // ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } } }
protected void btnDelete_Click(object sender, EventArgs e) { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); try { ListBox lb = GetSelectedListBox(); if (lb == null) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "alert", "alert('Please select a system parameter from listboxes');", true); return; } if (lb.ID == lsbModule.ID) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "alert", "alert('Modules can be only deleted through Module edit screen');", true); return; } // string query = "update " + lsbModule.SelectedValue + " set Active_Status = 0 where Code =" + lb.SelectedValue + ";"; // int result = objsys.deleteSysparameter(query); StringBuilder sbquery = new StringBuilder(); sbquery.Append("update " + lsbModule.SelectedValue + " set Active_Status = 0 where Code =" + lb.SelectedValue + " "); sbquery.Append(@" DECLARE @Code INT ,@PkCondition VARCHAR(400) ,@TableName VARCHAR(100),@VSlcount INT ,@VSLID VARCHAR(25) SET @Code=" + lb.SelectedValue + @" SET @PkCondition = 'CODE=''' + cast(@Code as varchar) + '''' SET @TableName='" + lsbModule.SelectedValue + @"' EXEC SYNC_SP_DataSynch_MultiPK_DataLog @TableName, @PkCondition, 0 "); int result = objsys.deleteSysparameter(sbquery.ToString()); GetList(Int32.Parse(Session["currentSelectedLB"].ToString())); if (result == 1) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Success", "alert('System parameter Successfully Deleted');", true); } else { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Failed", "alert('An error occured while Deleting please try later');", true); } } catch (Exception ex) { //ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } }
private void GetModules() { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); try { //SysPar_BAL obj = new SysPar_BAL(); lsbModule.DataSource = objsys.GetModules(Int32.Parse(ddlModule.SelectedValue)); lsbModule.DataTextField = "module"; lsbModule.DataValueField = "tablename"; lsbModule.DataBind(); LsbLevel1.Items.Clear(); LsbLevel2.Items.Clear(); LsbLevel3.Items.Clear(); LsbLevel4.Items.Clear(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); } catch (Exception ex) { // ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } }
protected void btnEdit_Click(object sender, EventArgs e) { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); try { if (Session["System_parameter"].ToString() == "1") { ListBox ls = GetSelectedListBox(); if (ls == null) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "alert", "alert('Step1: select the Child System parameter press Update Button modify name and description');", true); return; } if (lsbModule.ID == ls.ID) { txtParent.Text = ""; txtParent.Visible = false; } else { txtParent.Visible = true; } //SysPar_BAL obj = new SysPar_BAL(); DataSet ds = objsys.GetDetailOfSystemParameter(Int32.Parse(ls.SelectedValue), lsbModule.SelectedValue); switch (lsbModule.SelectedValue.Trim().ToUpper()) { case "PURC_LIB_SYSTEM_PARAMETERS": txtCode.Text = ds.Tables[0].Rows[0]["Code"].ToString(); if (ds.Tables[0].Rows[0]["Parent_Code"].ToString() != "") { txtParentType.Text = ds.Tables[0].Rows[0]["Parent_Code"].ToString(); } else { txtParentType.Text = "0"; } txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString(); if (ds.Tables[0].Rows[0]["Active_Status"].ToString().ToLower() == "1") { rbActiveYes.Checked = true; } else { RbActiveNo.Checked = false; } break; case "LIB_VESSELLIB_SYSTEMS_PARAMETERS": case "FBM_LIB_SYSTEMS_PARAMETERS": case "ACC_LIB_SYSTEMS_PARAMETERS": case "TEC_LIB_SYSTEMS_PARAMETERS": txtCode.Text = ds.Tables[0].Rows[0]["Code"].ToString(); if (ds.Tables[0].Rows[0]["Parent_Code"].ToString() != "") { txtParentType.Text = ds.Tables[0].Rows[0]["Parent_Code"].ToString(); } else { txtParentType.Text = "0"; } txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString(); if (ds.Tables[0].Rows[0]["Active_Status"].ToString().ToLower() == "1") { rbActiveYes.Checked = true; } else { RbActiveNo.Checked = false; } break; case "QMS_SYSTEMPARAMETERS": case "SEP_TASK_SYSTEMPARAMETERS": txtCode.Text = ds.Tables[0].Rows[0]["Code"].ToString(); if (ds.Tables[0].Rows[0]["Parent_Code"].ToString() != "") { txtParentType.Text = ds.Tables[0].Rows[0]["Parent_Code"].ToString(); } else { txtParentType.Text = "0"; } txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString(); if (ds.Tables[0].Rows[0]["Active_Status"].ToString().ToLower() == "1") { rbActiveYes.Checked = true; } else { RbActiveNo.Checked = false; } break; default: txtCode.Text = ds.Tables[0].Rows[0]["Code"].ToString(); if (ds.Tables[0].Rows[0]["Parent_Code"].ToString() != "") { txtParentType.Text = ds.Tables[0].Rows[0]["Parent_Code"].ToString(); } else { txtParentType.Text = "0"; } txtName.Text = ds.Tables[0].Rows[0]["name"].ToString(); txtDescription.Text = ds.Tables[0].Rows[0]["description"].ToString(); if (ds.Tables[0].Rows[0]["Active_Status"].ToString().ToLower() == "1") { rbActiveYes.Checked = true; } else { RbActiveNo.Checked = false; } break; } txtParent.Visible = false; txtModule.Visible = false; EnabledisableAllControl(true); btnEdit.Enabled = false; Session["System_parameter"] = "2"; ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "showDialog", "showDialog();", true); ViewState["OperationMode"] = "Edit"; return; } //if (Session["System_parameter"].ToString() == "2") //{ // Listparameter ls = (Listparameter)Session["upObj"]; // ListBox lb = GetSelectedListBox(); // if (lb == null) // return; // if (Session["ParentTableName"].ToString() != lsbModule.SelectedValue) // { // ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "alert", "alert('Parent module of System Parameter cannot be changed');", true); // Session["System_parameter"] = "1"; // btnAdd.Enabled = true; // btnExport.Enabled = true; // btnDelete.Enabled = true; // btnAddModule.Enabled = true; // return; // } // int num; // bool isnumeric = Int32.TryParse(lb.SelectedValue, out num); // if (isnumeric) // ls.Parent = Int32.Parse(lb.SelectedValue); // else // ls.Parent = -1; // //SysPar_BAL obj = new SysPar_BAL(); // int result = objsys.updateSysParam(ls.ChildId, ls.Name, ls.Parent, ls.Description, ls.Active, lsbModule.SelectedValue, Int32.Parse(Session["userid"].ToString())); // Session["System_parameter"] = "1"; // //GetList(Int32.Parse(Session["currentSelectedLB"].ToString())); // GetList(Int32.Parse(Session["currentSelectedLB"].ToString()) + 1); // btnAdd.Enabled = true; // btnExport.Enabled = true; // btnDelete.Enabled = true; // btnAddModule.Enabled = true; // if (result == 1) // ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Success", "alert('System Parameter Successfully Updated');", true); // else // ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Failed", "alert('An error occured while adding please try later');", true); // return; //} } catch (Exception ex) { //ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } }
protected void btnsaveRecords_Click(object sender, EventArgs e) { BLL_Infra_SysParamater objService = new BLL_Infra_SysParamater(); try { if (btnAdd.Enabled == true) { int i = 0; bool blnExec = false; if (rbActiveYes.Checked) { i = 1; } StringBuilder sbQuery = new StringBuilder(); /* On the basis of the Module the entries will be inserted on Correspondence 'System parameter table' .*/ switch (lsbModule.SelectedValue.Trim().ToUpper()) { case "PURC_LIB_SYSTEM_PARAMETERS": if (txtParent.Text == "") { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(code,Parent_type,Short_Code,Description,Created_By,Date_Of_Created,Active_Status) ( select isnull(max(Code),0)+1 ,0,'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } else { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(code,Parent_type,Short_Code,Description,Created_By,Date_Of_Created,Active_Status) ( select isnull(max(Code),0)+1 ," + Session["addParentID"].ToString() + ",'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } sbQuery.Append(@" DECLARE @Code INT ,@PkCondition VARCHAR(400) ,@TableName VARCHAR(100),@VSlcount INT ,@VSLID VARCHAR(25) SELECT @Code = ISNULL(MAX(CODE),0) FROM " + lsbModule.SelectedValue + @" SET @PkCondition = 'CODE=''' + cast(@Code as varchar) + '''' SET @TableName='" + lsbModule.SelectedValue + @"' EXEC SYNC_SP_DataSynch_MultiPK_DataLog @TableName, @PkCondition, 0 "); blnExec = true; break; case "LIB_VESSELLIB_SYSTEMS_PARAMETERS": case "FBM_LIB_SYSTEMS_PARAMETERS": case "ACC_LIB_SYSTEMS_PARAMETERS": case "TEC_LIB_SYSTEMS_PARAMETERS": case "OPS_LIB_SYSTEMS_PARAMETERS": if (txtParent.Text == "") { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(CODE,PARENT_CODE,NAME,DESCRIPTION,Created_By,DATE_OF_CREATION,ACTIVE_STATUS) ( select isnull(max(Code),0)+1 ,0,'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } else { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(CODE,PARENT_CODE,NAME,DESCRIPTION,Created_By,DATE_OF_CREATION,ACTIVE_STATUS) ( select isnull(max(Code),0)+1 ," + Session["addParentID"].ToString() + ",'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } sbQuery.Append(@" DECLARE @Code INT ,@PkCondition VARCHAR(400) ,@TableName VARCHAR(100),@VSlcount INT ,@VSLID VARCHAR(25) SELECT @Code = ISNULL(MAX(CODE),0) FROM " + lsbModule.SelectedValue + @" SET @PkCondition = 'CODE=''' + cast(@Code as varchar) + '''' SET @TableName='" + lsbModule.SelectedValue + @"' EXEC SYNC_SP_DataSynch_MultiPK_DataLog @TableName, @PkCondition, 0 "); blnExec = true; break; case "QMS_SYSTEMPARAMETERS": case "SEP_TASK_SYSTEMPARAMETERS": if (txtParent.Text == "") { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(Prarent_Code,Name,Description,Active_Status) values (0,'" + txtName.Text + "','" + txtDescription.Text + "'," + i.ToString() + ")"); } else { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(Prarent_Code,Name,Description,Active_Status) values (" + Session["addParentID"].ToString() + ",'" + txtName.Text + "','" + txtDescription.Text + "'," + i.ToString() + ")"); } sbQuery.Append(@" DECLARE @Code INT ,@PkCondition VARCHAR(400) ,@TableName VARCHAR(100),@VSlcount INT ,@VSLID VARCHAR(25) SELECT @Code = ISNULL(MAX(ID),0) FROM " + lsbModule.SelectedValue + @" SET @PkCondition = 'ID=''' + cast(@Code as varchar) + '''' SET @TableName='" + lsbModule.SelectedValue + @"' EXEC SYNC_SP_DataSynch_MultiPK_DataLog @TableName, @PkCondition, 0 "); blnExec = true; break; default: if (txtParent.Text == "") { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(code,Parent_type,Short_Code,Description,Created_By,Date_Of_Created,Active_Status) ( select isnull(max(Code),0)+1 ,0,'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } else { sbQuery.Append(" insert into " + lsbModule.SelectedValue + "(code,Parent_type,Short_Code,Description,Created_By,Date_Of_Created,Active_Status) ( select isnull(max(Code),0)+1 ," + Session["addParentID"].ToString() + ",'" + txtName.Text + "','" + txtDescription.Text + "'," + Session["userid"].ToString() + ",GetDate()," + i.ToString() + " from " + lsbModule.SelectedValue + ")"); } sbQuery.Append(@" DECLARE @Code INT ,@PkCondition VARCHAR(400) ,@TableName VARCHAR(100),@VSlcount INT ,@VSLID VARCHAR(25) SELECT @Code = ISNULL(MAX(CODE),0) FROM " + lsbModule.SelectedValue + @" SET @PkCondition = 'CODE=''' + cast(@Code as varchar) + '''' SET @TableName='" + lsbModule.SelectedValue + @"' EXEC SYNC_SP_DataSynch_MultiPK_DataLog @TableName, @PkCondition, 0 "); blnExec = true; break; } if (blnExec) { int result = objService.insertSysparameter(sbQuery.ToString()); if (txtParent.Text == "") { GetList(1); } else { GetList(Int32.Parse(Session["currentSelectedLB"].ToString()) + 1); } EnabledisableAllControl(false); if (result == 1) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Success", "alert('System parameter Successfully added');", true); } else { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Failed", "alert('An error occured while adding please try later');", true); } } } else //if (btnEdit.Enabled == true) { //Listparameter lb = new Listparameter(); //if (rbActiveYes.Checked == true) // lb.Active = 1; //else // lb.Active = 0; //ListBox ls = GetSelectedListBox(); //lb.ChildId = Int32.Parse(ls.SelectedValue); //lb.Description = txtDescription.Text; //lb.Name = txtName.Text; //Session["upObj"] = lb; //Session["ParentTableName"] = lsbModule.SelectedValue; ////ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "alert", "alert('Step2: Please select Parent system parameter from the child');", true); //EnabledisableAllControl(false); //btnAdd.Enabled = false; //btnDelete.Enabled = false; //btnExport.Enabled = false; //btnAddModule.Enabled = false; //btnEdit.Enabled = true; int active_status = 1; BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); if (rbActiveYes.Checked == true) { active_status = 1; } else { active_status = 0; } int result = objsys.updateSysParam(Convert.ToInt32(txtCode.Text), txtName.Text, Convert.ToInt32(txtParentType.Text), txtDescription.Text, active_status, lsbModule.SelectedValue, Int32.Parse(Session["userid"].ToString())); Session["System_parameter"] = "1"; GetList(Int32.Parse(Session["currentSelectedLB"].ToString())); //GetList(Int32.Parse(Session["currentSelectedLB"].ToString()) + 1); EnabledisableAllControl(false); btnAdd.Enabled = true; btnDelete.Enabled = true; btnExport.Enabled = true; btnAddModule.Enabled = true; btnEdit.Enabled = true; if (result == 1) { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Success", "alert('System Parameter Successfully Updated');", true); } else { ScriptManager.RegisterClientScriptBlock(tblPanel, this.GetType(), "Failed", "alert('An error occured while adding please try later');", true); } return; } txtModule.Text = ""; txtName.Text = ""; txtParent.Text = ""; txtDescription.Text = ""; } catch (Exception ex) { //ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } }
private void GetList(int lstBoxNo) { BLL_Infra_SysParamater objsys = new BLL_Infra_SysParamater(); try { //SysPar_BAL obj = new SysPar_BAL(); switch (lstBoxNo) { case 1: LsbLevel1.DataSource = objsys.GetListValues(lsbModule.SelectedValue, "", ddlActive1.SelectedValue); LsbLevel1.DataTextField = "name"; LsbLevel1.DataValueField = "code"; LsbLevel1.DataBind(); LsbLevel1.Focus(); LsbLevel2.Items.Clear(); //LsbLevel2.DataSource = null; //LsbLevel2.DataBind(); LsbLevel3.Items.Clear(); //LsbLevel3.DataSource = null; //LsbLevel3.DataBind(); LsbLevel4.Items.Clear(); //LsbLevel4.DataSource = null; //LsbLevel4.DataBind(); LsbLevel5.Items.Clear(); //LsbLevel5.DataSource = null; //LsbLevel5.DataBind(); LsbLevel6.Items.Clear(); //LsbLevel6.DataSource = null; //LsbLevel6.DataBind(); break; case 2: LsbLevel2.DataSource = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel1.SelectedValue, ddlActive2.SelectedValue); LsbLevel2.DataTextField = "name"; LsbLevel2.DataValueField = "code"; LsbLevel2.DataBind(); LsbLevel2.Focus(); LsbLevel3.Items.Clear(); LsbLevel4.Items.Clear(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); /*LsbLevel3.Items.Clear(); * LsbLevel3.DataSource = null; * LsbLevel3.DataBind(); * LsbLevel4.Items.Clear(); * LsbLevel4.DataSource = null; * LsbLevel4.DataBind(); * LsbLevel5.Items.Clear(); * LsbLevel5.DataSource = null; * LsbLevel5.DataBind(); * LsbLevel6.Items.Clear(); * LsbLevel6.DataSource = null; * LsbLevel6.DataBind();*/ break; case 3: LsbLevel3.DataSource = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel2.SelectedValue, ddlActive3.SelectedValue); LsbLevel3.DataTextField = "name"; LsbLevel3.DataValueField = "code"; LsbLevel3.DataBind(); LsbLevel3.Focus(); LsbLevel4.Items.Clear(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); /*LsbLevel4.Items.Clear(); * LsbLevel4.DataSource = null; * LsbLevel4.DataBind(); * LsbLevel5.Items.Clear(); * LsbLevel5.DataSource = null; * LsbLevel5.DataBind(); * LsbLevel6.Items.Clear(); * LsbLevel6.DataSource = null; * LsbLevel6.DataBind();*/ break; case 4: LsbLevel4.DataSource = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel3.SelectedValue, ddlActive4.SelectedValue); LsbLevel4.DataTextField = "name"; LsbLevel4.DataValueField = "code"; LsbLevel4.DataBind(); LsbLevel4.Focus(); LsbLevel5.Items.Clear(); LsbLevel6.Items.Clear(); /*LsbLevel5.Items.Clear(); * LsbLevel5.DataSource = null; * LsbLevel5.DataBind(); * LsbLevel6.Items.Clear(); * LsbLevel6.DataSource = null; * LsbLevel6.DataBind();*/ break; case 5: LsbLevel5.DataSource = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel4.SelectedValue, ddlActive5.SelectedValue); LsbLevel5.DataTextField = "name"; LsbLevel5.DataValueField = "code"; LsbLevel5.DataBind(); LsbLevel5.Focus(); LsbLevel6.Items.Clear(); /*LsbLevel6.DataSource = null; * LsbLevel6.DataBind();*/ break; case 6: LsbLevel6.DataSource = objsys.GetListValues(lsbModule.SelectedValue, LsbLevel5.SelectedValue, ddlActive6.SelectedValue); LsbLevel6.DataTextField = "name"; LsbLevel6.DataValueField = "code"; LsbLevel6.Focus(); LsbLevel6.DataBind(); break; default: break; } } catch (Exception ex) { //ErrorLogHandler.WriteError(this.GetType().Name.ToString(), System.Reflection.MethodBase.GetCurrentMethod().Name.ToString(), ex); } }