Exemplo n.º 1
0
    //取消映射
    protected void lbtnCancelMapping_Click(object sender, EventArgs e)
    {
        Pkurg.PWorldBPM.Common.Services.OrgService services = new Pkurg.PWorldBPM.Common.Services.OrgService();
        Pkurg.PWorldBPM.Common.Info.UserInfo       model    = services.GetUserInfo(fromUserCode);
        if (model != null)
        {
            System.Web.HttpContext.Current.Session["BPM_User"] = model;

            string CurrentUserCode = HttpContext.Current.User.Identity.Name.ToLower().Replace("founder\\", "");
            ClassMappingUser.UpdateState(CurrentUserCode, 0);
            lbtnMapping.Visible       = true;
            lbtnCancelMapping.Visible = false;
        }

        Response.Redirect("~/Default.aspx");
    }
Exemplo n.º 2
0
    void DoMapping()
    {
        string currentUserCode = HttpContext.Current.User.Identity.Name.ToLower().Replace("founder\\", "");

        Pkurg.PWorldBPM.Business.Sys.SYS_MappingUser mapping = ClassMappingUser.UpdateState(currentUserCode, 1);
        if (mapping != null)
        {
            string toUserCode = mapping.ToUserCode;
            Pkurg.PWorldBPM.Common.Services.OrgService services = new Pkurg.PWorldBPM.Common.Services.OrgService();
            Pkurg.PWorldBPM.Common.Info.UserInfo       model    = services.GetUserInfo(toUserCode);
            if (model != null)
            {
                _BPMContext.LoginId = toUserCode;
            }
        }
        Response.Redirect("~/Default.aspx");
    }