private void BindUserData(string userid) { ViewState["UserID"] = userid; DataTable dtUser = employee.GetUserData(userid); if (dtUser != null && dtUser.Rows.Count > 0) { //lblUserName.Text = dtUser.Rows[0]["Name"].ToString(); //lblLocation.Text = dtUser.Rows[0]["Location"].ToString(); SelectItem(ddlUserInterface, dtUser.Rows[0]["UserInterfaceInd"].ToString()); txtMSADUserName.Text = dtUser.Rows[0]["MSADUserName"].ToString(); lblLastLogin.Text = ((dtUser.Rows[0]["LastLoginDt"].ToString() != "01/01/1900")?dtUser.Rows[0]["LastLoginDt"].ToString():""); lblNoLogins.Text = dtUser.Rows[0]["NoofLogins"].ToString(); lblLogStatus.Text = dtUser.Rows[0]["LogonStatusInd"].ToString(); txtUserName.Text = dtUser.Rows[0]["UserName"].ToString(); txtPassword.Attributes.Add("value", dtUser.Rows[0]["Password"].ToString()); txtDomain.Text = dtUser.Rows[0]["Domain"].ToString(); SelectItem(ddlBuyer, dtUser.Rows[0]["BuyerInd"].ToString()); SelectItem(ddlApproveOrders, dtUser.Rows[0]["ApproveOrderInd"].ToString()); SelectItem(ddlARClerk, dtUser.Rows[0]["ARClerkInd"].ToString()); SelectItem(ddlPrompt, dtUser.Rows[0]["PrimaryBinPrmpt"].ToString()); txtDollarLimit.Text = ((dtUser.Rows[0]["PODolLimit"].ToString() != "")? String.Format("{0:###0.00}", Convert.ToDecimal(dtUser.Rows[0]["PODolLimit"])):""); txtConsumable.Text = ((dtUser.Rows[0]["ConsumablesAmt"].ToString() != "")?String.Format("{0:###0.00}", Convert.ToDecimal(dtUser.Rows[0]["ConsumablesAmt"])):""); } ViewState["Mode"] = "Save"; }
private void BindUserPermission() { ClearControl(); DataTable dtUserPermis = employee.GetUserData(User.ToString()); if (dtUserPermis != null && dtUserPermis.Rows.Count > 0) { lblUserName.Text = dtUserPermis.Rows[0]["UserName"].ToString(); SelectItem(rdlAP, dtUserPermis.Rows[0]["APApplicationInd"].ToString()); SelectItem(rdlAR, dtUserPermis.Rows[0]["ARApplicationInd"].ToString()); SelectItem(rdlGL, dtUserPermis.Rows[0]["GLApplicationInd"].ToString()); SelectItem(rdlIM, dtUserPermis.Rows[0]["IMApplicationInd"].ToString()); SelectItem(rdlPOE, dtUserPermis.Rows[0]["POApplicationInd"].ToString()); SelectItem(rdlSOE, dtUserPermis.Rows[0]["OEApplicationInd"].ToString()); } }