예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (Session["Info"] != null)
                {
                    DataTable dtCus = CustomersService.Customers_GetById(((Customers)Session["Info"]).Id);

                    cus.Id          = dtCus.Rows[0]["Id"].ToString();
                    cus.AppId       = dtCus.Rows[0]["AppId"].ToString();
                    cus.Email       = dtCus.Rows[0]["Email"].ToString();
                    cus.UserName    = dtCus.Rows[0]["UserName"].ToString();
                    cus.FullName    = dtCus.Rows[0]["FullName"].ToString();
                    cus.Password    = dtCus.Rows[0]["Password"].ToString();
                    cus.Phone       = dtCus.Rows[0]["Phone"].ToString();
                    cus.Gender      = dtCus.Rows[0]["Gender"].ToString();
                    cus.CreatedDate = DateTime.Parse(dtCus.Rows[0]["CreatedDate"].ToString()).ToString("MM/dd/yyyy HH:mm:ss");
                    cus.Ord         = dtCus.Rows[0]["Ord"].ToString();
                    cus.Active      = dtCus.Rows[0]["Active"].ToString();
                }
                else
                {
                    Response.Redirect("/", false);
                    return;
                }
                if (!IsPostBack)
                {
                    if (cus != null)
                    {
                        txtFullName.Value = cus.FullName;
                        txtEmail.Value    = cus.Email;
                        txtPhone.Value    = cus.Phone;
                    }
                }
            }
            catch (Exception ex)
            {
                MailSender.SendMail("", "", "Error System", ex.Message + "\n" + ex.StackTrace);
            }
        }