示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Model.t_staff t_staff = (Model.t_staff)Session["UserInfo"];

                if (t_staff == null)
                {
                    Response.Redirect("Default.aspx?id=1");
                }
                userid2.Text = userid.Text = t_staff.sta_id.ToString();

                if (Request["rid"] != null)
                {
                    string id = Request["rid"];
                    Model.t_tradingrecord tradingrecord = new BLL.t_tradingrecord().GetModel(int.Parse(id));
                    tradingrecord.tra_staff_id = int.Parse(t_staff.sta_id.ToString());
                    if (tradingrecord.tra_accomplish == "发布")
                    {
                        tradingrecord.tra_accomplish = "已接单";
                        new BLL.t_tradingrecord().Update(tradingrecord);
                    }
                    else
                    {
                        MessageBox.Show(this, "不能接单了,对方可能已经取消了订单或者已经接单了");
                    }
                }
            }
        }
示例#2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Model.t_staff user = (Model.t_staff)Session["UserInfo"];

                if (user == null)
                {
                    Response.Redirect("Default.aspx?menuid=1");
                }
                userid.Text = user.sta_id.ToString();
                if (Request["cid"] != null)
                {
                    string id = Request["cid"];
                    traid.Text = id;
                    DataSet ds = new BLL.t_orderevaluate().GetList(" oe_per_id= " + user.sta_id + " and oe_per_type='回收员' and  oe_tra_id=" + id);
                    if (ds.Tables.Count == 1 && ds.Tables[0].Rows.Count == 0)
                    {
                        MultiView1.ActiveViewIndex = 0;
                    }
                    else
                    {
                        MultiView1.ActiveViewIndex = 2;
                    }
                }
                else
                {
                    Response.Redirect("Default.aspx?menuid=1");
                }
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
     if (staff == null)
     {
         Response.Redirect("../Admin/Login.aspx");
     }
 }
示例#4
0
        private void EditPhotoData(string i)
        {
            Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
            int           num   = Convert.ToInt32(i);

            staff.sta__pic_id = num;

            new BLL.t_staff().Update(staff);
            Session["UserInfo"] = staff;
            Response.Redirect("Default.aspx");
        }
示例#5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Model.t_staff staff = (Model.t_staff)Session["UserInfo"];

            if (staff != null)
            {
                default_img.Src    = new BLL.t_picture().GetModel(Convert.ToInt32(staff.sta__pic_id)).pic_valid;
                usertype.InnerText = staff.staffcategory.stac_name;
                username.InnerText = "亲爱的" + staff.sta_name;
            }
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!Page.IsPostBack)
     {
         Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
         if (staff == null)
         {
             Response.Redirect("Default.aspx?id=1");
         }
         ShowInfo(staff.sta_id);
     }
 }
示例#7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
     if (staff != null)
     {
         staffid.InnerText = staff.sta_id.ToString();
     }
     else
     {
         Response.Redirect("Default.aspx?menuid=1");
     }
 }
        private void ShowInfo(string id)
        {
            Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
            if (staff == null)
            {
                Response.Redirect("WALLEcommunity.aspx?id=36");
            }
            userid.Text = staff.sta_id.ToString();
            Model.t_systemleave systemleave = new BLL.t_systemleave().GetModel(int.Parse(id));

            // userid.Text = staff.sta_id.ToString();
            //staffImg.Src = new BLL.t_picture().GetModel(staff.u_pic_ID).pic_valid;
            content.InnerText = systemleave.sl_content;
            date.InnerText    = systemleave.sl_date.ToString();
            main_img.Src      = new BLL.t_picture().GetModel(int.Parse(systemleave.sl_pic_id.ToString())).pic_valid;
        }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Model.t_staff staff = (Model.t_staff)Session["UserInfo"];
         ShowInfo();
         if (staff == null || Session["UserInfo"] == null)
         {
             Response.Redirect(@"..\Admin\Login.aspx");
         }
         else
         {
             salary.InnerText    = staff.sta_salary.ToString();
             staffID.Text        = staff.sta_id.ToString();
             staffName.InnerText = staff.sta_name;
         }
     }
 }
        protected void Page_Load(object sender, EventArgs e)
        {
            lab_menu.Value = Request.Params["menuid"];
            Model.t_staff staff = (Model.t_staff)Session["UserInfo"];

            if (staff == null || Session["UserInfo"] == null)
            {
                Response.Redirect(@"..\Admin\Login.aspx");
            }
            else
            {
                txt_name.InnerText = staff.sta_name;
                usertype.InnerText = staff.staffcategory.stac_name;
                string userType = staff.staffcategory.stac_name;
                username.InnerText = "亲爱的" + staff.sta_userName;
                img_photo.Src      = new BLL.t_picture().GetModel(Convert.ToInt32(staff.sta__pic_id)).pic_valid;
                lastlogn.InnerText = " 您最后一次登陆本系统时间是:" + staff.sta_entryDate.ToString();

                if (!IsPostBack)
                {
                    if (userType.Equals("经理"))
                    {
                        Response.Cookies["USER_TYPE"].Value = "StaM_Boss=1";
                    }
                    else if (userType.Equals("管理员"))
                    {
                        Response.Cookies["USER_TYPE"].Value = "StaM_Admin=1";
                    }
                    else if (userType.Equals("回收员"))
                    {
                        Response.Cookies["USER_TYPE"].Value = "StaM_Staff=1";
                    }
                    else if (userType.Equals("财务"))
                    {
                        Response.Cookies["USER_TYPE"].Value = "StaM_Finance=1";
                    }
                    else if (userType.Equals("超级管理员"))
                    {
                        Response.Cookies["USER_TYPE"].Value = "StaM_SuperAdmin=1";
                    }
                }
            }
            //  SqlDataSource ds = (SqlDataSource)ListView1.FindControl("childDataSource");
        }
示例#11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                user = (Model.t_staff)Session["UserInfo"];

                if (user == null)
                {
                    Response.Redirect("CommodityView.aspx?menuid=9");
                }
                if (Request.Params["cid"] != null && Request.Params["cid"].Trim() != "")
                {
                    strid = Request.Params["cid"];
                    int com_ID = (Convert.ToInt32(strid));
                    ShowInfo(com_ID);
                }
                else
                {
                    Response.Redirect("CommodityView.aspx?menuid=9");
                }
            }
        }
示例#12
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                t_staff = (Model.t_staff)Session["UserInfo"];

                if (t_staff == null)
                {
                    Response.Redirect("WasteView.aspx?id=5");
                }
                userid.Text = t_staff.sta_id.ToString();
                if (Request.Params["wid"] != null && Request.Params["wid"].Trim() != "")
                {
                    strid = Request.Params["wid"];
                    int com_ID = (Convert.ToInt32(strid));
                    ShowInfo(com_ID);
                }
                else
                {
                    Response.Redirect("Default.aspx?id=1");
                }
            }
        }
示例#13
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         Model.t_staff staff  = (Model.t_staff)Session["UserInfo"];
         HttpCookie    staffc = new HttpCookie("staff");
         if (staff != null)
         {
             Session["UserInfo"] = null;
             staffc.Value        = "用户信息";
             // 设定cookie的生命周期,在这里定义为一个小时
             DateTime dtNow    = DateTime.Now;
             TimeSpan tsMinute = new TimeSpan(0, 5, 3, 0);
             staffc.Expires          = dtNow + tsMinute;
             staffc["staffImg"]      = new BLL.t_picture().GetModel(Convert.ToInt32(staff.sta__pic_id)).pic_valid;
             staffc["staffName"]     = staff.sta_userName;
             staffc["staffUserName"] = staff.sta_id.ToString();
             staffc["staffpw"]       = staff.sta_passWord;
             staffc["staffID"]       = staff.sta_id.ToString();
             Response.Cookies.Add(staffc);
             imgPhoto.Src   = staffc.Values["staffImg"];
             StaffName.Text = staffc.Values["staffName"];
         }
         else
         {
             if (staffc.Values["staffName"] == "" || staffc == null)
             {
                 Response.Redirect("../Admin/Login.aspx");
             }
             else
             {
                 imgPhoto.Src   = staffc.Values["staffImg"];
                 StaffName.Text = staffc.Values["staffName"];
             }
         }
     }
 }