Beispiel #1
0
    private void GetUserDetails(int user_master_id)
    {
        try
        {
            DataSet objds = objBALUser.GetUserDetails(user_master_id);
            if (objds.Tables[0].Rows.Count > 0)
            {
                hfUserId.Value             = objds.Tables[0].Rows[0]["user_master_id"].ToString();
                dropUserType.SelectedIndex = dropUserType.Items.IndexOf(dropUserType.Items.FindByValue(objds.Tables[0].Rows[0]["role_id"].ToString()));
                dropLocation.SelectedIndex = dropLocation.Items.IndexOf(dropLocation.Items.FindByValue(objds.Tables[0].Rows[0]["LocationId"].ToString()));
                dropStatus.SelectedIndex   = dropStatus.Items.IndexOf(dropStatus.Items.FindByValue(objds.Tables[0].Rows[0]["user_master_status"].ToString()));
                txtFirstName.Text          = objds.Tables[0].Rows[0]["FirstName"].ToString();
                txtLastName.Text           = objds.Tables[0].Rows[0]["LastName"].ToString();
                txtMobileNumber.Text       = objds.Tables[0].Rows[0]["user_master_mobile"].ToString();
                txtLandLineNumber.Text     = objds.Tables[0].Rows[0]["user_master_land"].ToString();
                txtEmailId.Text            = objds.Tables[0].Rows[0]["user_master_mail"].ToString();
                txtEmailId.Text            = objds.Tables[0].Rows[0]["user_name"].ToString();
                Image1.ImageUrl            = "CustomerImages/" + objds.Tables[0].Rows[0]["user_master_logo"].ToString();
                //txtPassword.Text = objds.Tables[0].Rows[0]["password"].ToString();
                PanelPassword.Visible = false;
                //txtConfirmPawd.Text = objds.Tables[0].Rows[0]["password"].ToString();
            }
        }

        catch (Exception ex)
        {
        }
    }
Beispiel #2
0
    private void BindCustomerDetails()
    {
        BALUser objBALUser = new BALUser();

        try
        {
            gdvCustomer.PageSize = int.Parse(ViewState["ps"].ToString());
            DataSet objds = objBALUser.GetUserDetails(0);
            Session["dt"] = objds.Tables[0];
            if (objds.Tables[0].Rows.Count > 0)
            {
                string sortDirection = "ASC", sortExpression;
                if (ViewState["so"] != null)
                {
                    sortDirection = ViewState["so"].ToString();
                }
                if (ViewState["se"] != null)
                {
                    sortExpression = ViewState["se"].ToString();
                    objds.Tables[0].DefaultView.Sort = sortExpression + " " + sortDirection;
                }
                gdvCustomer.DataSource = objds.Tables[0];
                gdvCustomer.DataBind();
            }
            else
            {
                gdvCustomer.DataSource = null;
                gdvCustomer.DataBind();
            }
        }
        catch (Exception ex)
        {
        }
    }