private void FillBranchList() { objUtil = new UtilityDB(); DataTable dt = null; //string sqlText = ""; try { if (strRep == "STOCKPOINT_DC" || strRep == "STOCKPOINT_DCST" || strRep == "STOCKPOINT_GRN" || strRep == "STOCK_REC" || strRep == "STOCK_SUMMARY" || strRep == "STOCK_LEDGER" || strRep == "STOCKPOINT_RECONSILATION" || strRep == "SP_PENDING_DC") { dt = objUtil.UserBranch(CommonData.LogUserId, "SP"); } else if (strRep == "VEHICLE_LOAN" || strRep == "VEHICLE_INFO" || strRep == "SALES_STAFF_ALL" || strRep == "SaleSummaryBulletin" || strRep == "SERVICE_CONSOLIDATION") { dt = objUtil.UserBranch(CommonData.LogUserId, "BR"); } else { dt = objUtil.dtUserBranch(CommonData.LogUserId); } clbGLList.Items.Clear(); foreach (DataRow dataRow in dt.Rows) { if (dataRow["branch_Code"] + "" != "") { NewCheckboxListItem oclBox = new NewCheckboxListItem(); oclBox.Tag = dataRow["branch_Code"].ToString(); oclBox.Text = dataRow["branch_name"].ToString(); clbGLList.Items.Add(oclBox); oclBox = null; } } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { objStfLvl = null; } }