Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<UMSLocationDetails> lstUMSLocationDetails = null;
- string strCurrentGroupName = "";
- int intCurrentGroupID = 0;
- if (!string.IsNullOrEmpty(strUsername))
- {
- List<UMSGroupDetails> lstUMSGroupDetails = null;
- List<UMSLocationDetails> lstUMSLocationDetails = null;
- ObjUMS.GetUMSGroups(strUsername, out strCurrentGroupName, out intCurrentGroupID, out lstUMSLocationDetails, out lstUMSGroupDetails);
- if (strCurrentGroupName != "" && intCurrentGroupID != 0)
- {
- string LoginUserName = strUsername.ToUpper();
- string CurrentGroupName = strCurrentGroupName;
- int CurrentGroupID = intCurrentGroupID;
- LocationDetails = lstUMSLocationDetails;
- GetR4GStates(lstUMSLocationDetails);
- }
- else
- {
- //error
- }
- }
- private void GetR4GStates(string LocationDetails)
- {
- List<SelectListItem> lstR4GState = new List<SelectListItem>();
- try
- {
- CommonDB ObjCommonDB = new CommonDB();
- DataTable dt = ObjCommonDB.GetR4GState(LocationDetails);
- if (dt.Rows.Count > 0)
- {
- lstR4GState = (from DataRow dr in dt.Rows
- select new SelectListItem()
- {
- Text = Convert.ToString(dr["R4GSTATENAME"]),
- Value = Convert.ToString(dr["R4GSTATECODE"])
- }).ToList();
- }
- else
- {
- SelectListItem slEmptyData = new SelectListItem();
- slEmptyData.Text = "No Data found";
- slEmptyData.Value = "No Data found";
- lstR4GState.Add(slEmptyData);
- }
- }
- catch (Exception)
- {
- throw;
- }
- }
Add Comment
Please, Sign In to add comment