Beispiel #1
0
        public void FillFields(int ID)
        {
            UsersHandler usersHandler = new UsersHandler();

            usersHandler.DoFillBackPanelAction(ID);
            DataTable UserData = usersHandler.dt;

            MessageCollection.copyFrom(usersHandler.MessageCollection);

            if (MessageCollection.isErrorOccured)
            {
                MessageCollection.PublishLog();
                lbl_err.Text    = MessageCollection.Messages[MessageCollection.Messages.Count - 1].ErrorMessage;
                lbl_err.Visible = true;
            }
            else
            {
                txt_id.Text  = UserData.Rows[0]["ID"].ToString();
                txt_usr.Text = UserData.Rows[0]["Name"].ToString();
                txt_pw.Attributes.Add("value", UserData.Rows[0]["Password"].ToString());
                ddl_accesslevel.SelectedValue = UserData.Rows[0]["AccessLevel"].ToString();
                ddl_accesslevel_SelectedIndexChanged(this, null);
                ddl_Company.SelectedValue = UserData.Rows[0]["Company"].ToString();
                txt_nam.Text   = UserData.Rows[0]["username"].ToString();
                txt_cntct.Text = UserData.Rows[0]["contactnumber"].ToString();
                txt_email.Text = UserData.Rows[0]["email"].ToString();
            }
        }