Exemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DataTable storeTable = storeBLL.GetAllStore();
         stno.DataTextField  = "stno";
         stno.DataValueField = "stno";
         stno.DataSource     = storeTable;
         stno.DataBind();
         if (Request.QueryString.Count > 0)
         {
             string  strmno = Request.QueryString["mno"].ToString();
             manager m      = managerBLL.GetSingleByno(strmno);
             if (m != null)
             {
                 mno.Value          = strmno;
                 mname.Value        = m.mname;
                 sex.Value          = m.sex;
                 birthday.Value     = m.birthday.ToString("yyyy-MM-dd");
                 stno.SelectedValue = m.stno;
             }
         }
         else
         {
             Response.Redirect("ManagerList.aspx");
         }
     }
 }
Exemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         try
         {
             string mno = Request.QueryString["mno"].ToString();
             var    man = bllman.GetSingleByno(mno);
             txtmno.Value   = man.mno;
             mname.Value    = man.mname;
             sex.Value      = man.sex;
             stno.Value     = man.stno;
             birthday.Value = man.birthday.ToString("yyyy-MM-dd");
         }
         catch (Exception ex)
         {
             Response.Redirect("ManagerList.aspx");
         }
     }
 }