示例#1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string   str        = Convert.ToString(HidRoleList.Value);
            string   ModuleGuid = Request.QueryString["ModuleGuid"];
            DataView dv         = Epoint.MisBizLogic2.DB.ExecuteDataView("select AllowGuid,RowGuid from RG_Module_Right where ModuleGuid='" + ModuleGuid + "'and (AllowType='Role' or AllowType='UserType')");

            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Module_Right", "ModuleGuid='" + ModuleGuid + "'and (AllowType='Role' or AllowType='UserType')", "RowGuid");
                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right where ModuleGuid='" + ModuleGuid + "'and (AllowType='Role' or AllowType='UserType')");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split(';');
                foreach (string s in strArray)
                {
                    if (!string.IsNullOrEmpty(s))
                    {
                        string  RowGuid   = Guid.NewGuid().ToString();
                        Boolean needtoAdd = true;
                        foreach (DataRowView row in dv)
                        {
                            if (Convert.ToString(row["AllowGuid"]) == s.Split('@')[0])
                            {
                                needtoAdd = false;
                            }
                        }
                        if (needtoAdd)
                        {
                            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module_Right");
                            orow["ModuleGuid"] = ModuleGuid;
                            orow["AllowGuid"]  = s.Split('@')[0];
                            orow["AllowType"]  = s.Split('@')[1];
                            orow["RowGuid"]    = RowGuid;
                            orow.Insert();
                            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module_Right", "RowGuid", RowGuid);
                        }
                    }
                }
                foreach (DataRowView row in dv)
                {
                    Boolean needtoDel = true;
                    foreach (string s in strArray)
                    {
                        if (Convert.ToString(row["AllowGuid"]) == s.Split('@')[0])
                        {
                            needtoDel = false;
                        }
                    }
                    if (needtoDel)
                    {
                        new ComDataSyn().DeleteWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module_Right", "RowGuid", row["RowGuid"].ToString());
                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right where RowGuid='" + row["RowGuid"].ToString() + "'");
                    }
                }
            }
            SaveAllowToAll();
            WriteAjaxMessage("window.close();");
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string str = Convert.ToString(HidUserList.Value);
            string AppGuid = Request.QueryString["AppGuid"];
            DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select AllowGuid from RG_Application_Right where AppGuid='" + AppGuid + "'and AllowType='User'");
            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Application_Right", "AppGuid='" + AppGuid + "'and AllowType='User'", "RowGuid");

                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Application_Right where AppGuid='" + AppGuid + "'and AllowType='User'");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split(';');
                foreach (string s in strArray)
                {
                    if (!string.IsNullOrEmpty(s))
                    {
                        string RowGuid = Guid.NewGuid().ToString();
                        int count = 0;
                        foreach (DataRowView row in dv)
                        {
                            if (Convert.ToString(row[0]) == s)
                            {
                                count++;
                            }
                        }
                        if (count == 0)
                        {
                            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Application_Right", RowGuid);
                            orow["AppGuid"] = AppGuid;
                            orow["AllowGuid"] = s;
                            orow["AllowType"] = "User";
                            orow["AppType"] = Request["AppType"];
                            orow.Insert();
                            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Application_Right", "RowGuid", RowGuid);
                        }
                    }

                }
                foreach (DataRowView row in dv)
                {
                    int count = 0;
                    foreach (string s in strArray)
                    {
                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Application_Right", "AllowGuid='" + Convert.ToString(row[0]) + "'and AppGuid='" + AppGuid + "'and AllowType='User'", "RowGuid");
                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Application_Right where AllowGuid='" + Convert.ToString(row[0]) + "'and AppGuid='" + AppGuid + "'and AllowType='User'");
                    }
                }
            }
            WriteAjaxMessage("window.close();");
        }
示例#3
0
        private void LoginRecord()
        {
            int EnableDays;

            // EnableDays = Convert.ToInt32(Epoint.Frame.Bizlogic.Frame_Config.GetConfigValue("RGLoginEnableTime","180"));
            EnableDays = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["RGLoginEnableTime"]);
            if (EnableDays == 0)
            {
                EnableDays = 180;//默认距当前180天
            }
            Database db = DatabaseFactory.CreateDatabase("EpointMis_ConnectionString");
            DateTime dt = DateTime.Now.AddDays(0 - EnableDays);
            // 清除离现在较久的登陆记录,防止RG_Login表过大
            string strSql = ((db.DbProviderFactory.ToString() != "System.Data.OracleClient.OracleClientFactory") ?
                             "DELETE FROM RG_Login WHERE LoginTime<@LoginTime" :
                             "DELETE FROM RG_Login WHERE LoginTime<:LoginTime");
            DbCommand cmd = db.GetSqlStringCommand(strSql);

            db.AddInParameter(cmd, "LoginTime", DbType.DateTime, dt);
            db.ExecuteNonQuery(cmd);

            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
            oRow["RGGuid"]         = rgUser.GetCurrentRegisterUser().RegisterUserGuid;
            oRow["LoginTime"]      = System.DateTime.Now.ToString();
            oRow["IsLoginSuccess"] = 1;
            oRow["Message"]        = "成功登陆";
            oRow.Insert();
        }
        protected void savbtn_Click(object sender, EventArgs e)
        {
            //string AllowType = ViewState["AllowType"].ToString();
            string AllowTo = ViewState["AllowTo"].ToString();

            //删除此用户原有配置的所有的模块
            //ModuleRights.Delete_Type(AllowTo, AllowType);
            Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right where AllowGuid='" + ViewState["AllowTo"].ToString() + "'and AllowType='OUType'");

            //返回的模块列表包含其他独立管理部门设置的模块
            string strSelectMoGuid = HidModuleGuid.Value;

            string[] moduleGuisLst = strSelectMoGuid.Split(';');
            string   moduleGuid    = "";

            for (int i = 0; i < moduleGuisLst.Length; i++)
            {
                moduleGuid = moduleGuisLst[i];
                if (moduleGuid != "")
                //ModuleRights.ModuleRight_Insert(moduleGuid, AllowTo, AllowType);
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module_Right");
                    oRow["RowGuid"]    = RowGuid;
                    oRow["ModuleGuid"] = moduleGuid;
                    oRow["AllowGuid"]  = ViewState["AllowTo"];
                    oRow["AllowType"]  = "OUType";
                    oRow.Insert();
                }
            }
            WriteAjaxMessage("alert('权限设置成功!');rtnValue('');");
        }
示例#5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string   str          = Convert.ToString(HidUserList.Value);
            string   ShortcutGuid = Request.QueryString["ShortcutGuid"];
            DataView dv           = Epoint.MisBizLogic2.DB.ExecuteDataView("select AllowGuid from RG_ShortcutMenu_Right where ShortcutGuid='" + ShortcutGuid + "'and AllowType='User'");

            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "ShortcutGuid='" + ShortcutGuid + "'and AllowType='User'", "RowGuid");

                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_ShortcutMenu_Right where ShortcutGuid='" + ShortcutGuid + "'and AllowType='User'");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split(';');
                foreach (string s in strArray)
                {
                    if (!string.IsNullOrEmpty(s))
                    {
                        string RowGuid = Guid.NewGuid().ToString();
                        int    count   = 0;
                        foreach (DataRowView row in dv)
                        {
                            if (Convert.ToString(row[0]) == s)
                            {
                                count++;
                            }
                        }
                        if (count == 0)
                        {
                            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_ShortcutMenu_Right", RowGuid);
                            orow["ShortcutGuid"] = ShortcutGuid;
                            orow["AllowGuid"]    = s;
                            orow["AllowType"]    = "User";
                            orow.Insert();
                            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "RowGuid", RowGuid);
                        }
                    }
                }
                foreach (DataRowView row in dv)
                {
                    int count = 0;
                    foreach (string s in strArray)
                    {
                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "AllowGuid='" + Convert.ToString(row[0]) + "'and ShortcutGuid='" + ShortcutGuid + "'and AllowType='User'", "RowGuid");

                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_ShortcutMenu_Right where AllowGuid='" + Convert.ToString(row[0]) + "'and ShortcutGuid='" + ShortcutGuid + "'and AllowType='User'");
                    }
                }
            }
            WriteAjaxMessage("window.close();");
        }
示例#6
0
        protected void savbtn_Click(object sender, EventArgs e)
        {
            string AllowTo = ViewState["AllowTo"].ToString();

            //删除此会员单位原有配置的所有的快捷方式
            Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_ShortcutMenu_Right where AllowGuid='" + AllowTo + "'and AllowType='OUType'");
            new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "AllowGuid='" + AllowTo + "'and AllowType='OUType'", "RowGuid");

            //保存有权限的快捷方式
            string strSelectMoGuid = HidShortcutGuid.Value;

            string[] ShortcutGuisLst = strSelectMoGuid.Split(';');
            string   ShortcutGuid    = "";

            for (int i = 0; i < ShortcutGuisLst.Length; i++)
            {
                ShortcutGuid = ShortcutGuisLst[i];
                if (ShortcutGuid != "")
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_ShortcutMenu_Right");
                    oRow["RowGuid"]      = RowGuid;
                    oRow["ShortcutGuid"] = ShortcutGuid;
                    oRow["AllowGuid"]    = AllowTo;
                    oRow["AllowType"]    = "OUType";
                    oRow.Insert();
                }
            }
            new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "AllowGuid='" + AllowTo + "'and AllowType='OUType'", "RowGuid");

            WriteAjaxMessage("alert('权限设置成功!');rtnValue('');");
        }
示例#7
0
        protected void SaveAllowToAll()
        {
            string MatterGuid = Request.QueryString["MatterGuid"];
            bool   isExists   = Epoint.MisBizLogic2.DB.ExecuteToInt("select COUNT(*) FROM RG_Matter_Right WHERE AllowGuid='All' and MatterGuid='" + MatterGuid + "'") > 0;

            if (chkAllowToAll.Checked)
            {
                // 添加完全公开的配置
                // 判断是否存在,如果存在,不需要添加配置
                if (!isExists)
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Matter_Right", RowGuid);
                    orow["MatterGuid"] = MatterGuid;
                    orow["AllowGuid"]  = "All";
                    orow["AllowType"]  = "";
                    orow.Insert();
                    new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Matter_Right", "RowGuid", RowGuid);
                }
            }
            else
            {
                // 删除完全公开的配置
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Matter_Right", "AllowGuid='All'and MatterGuid='" + MatterGuid + "'", "RowGuid");
                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Matter_Right WHERE AllowGuid='All'and MatterGuid='" + MatterGuid + "'");
            }
        }
示例#8
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string VUserGuid = Request.QueryString["RowGuid"];
            DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select MapGuid from RG_VUser where VUserGuid='" + VUserGuid + "'and MapType='OU'");
            string str = Convert.ToString(HidOuList.Value);
            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_VUser", " VUserGuid='" + VUserGuid + "'and MapType='OU'", "RowGuid");

                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_VUser where VUserGuid='" + VUserGuid + "'and MapType='OU'");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split('★');

                foreach (string s in strArray)
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    string MapType = "OU";
                    int count = 0;
                    foreach (DataRowView row in dv)
                    {
                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_VUser", RowGuid);
                        orow["VUserGuid"] = VUserGuid;
                        orow["MapType"] = MapType;
                        orow["MapGuid"] = s;
                        orow.Insert();
                        new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_VUser", "RowGuid", RowGuid);
                    }
                }
                foreach (DataRowView row in dv)
                {
                    int count = 0;
                    foreach (string s in strArray)
                    {

                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_VUser", "MapGuid='" + Convert.ToString(row[0]) + "'and VUserGuid='" + VUserGuid + "'and MapType='OU'", "RowGuid");

                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_VUser where MapGuid='" + Convert.ToString(row[0]) + "'and VUserGuid='" + VUserGuid + "'and MapType='OU'");
                    }
                }
            }
            WriteAjaxMessage("window.close();");
        }
示例#9
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string   VUserGuid = Request.QueryString["RowGuid"];
            DataView dv        = Epoint.MisBizLogic2.DB.ExecuteDataView("select MapGuid from RG_VUser where VUserGuid='" + VUserGuid + "'and MapType='OU'");
            string   str       = Convert.ToString(HidOuList.Value);

            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_VUser", " VUserGuid='" + VUserGuid + "'and MapType='OU'", "RowGuid");

                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_VUser where VUserGuid='" + VUserGuid + "'and MapType='OU'");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split('★');

                foreach (string s in strArray)
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    string MapType = "OU";
                    int    count   = 0;
                    foreach (DataRowView row in dv)
                    {
                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_VUser", RowGuid);
                        orow["VUserGuid"] = VUserGuid;
                        orow["MapType"]   = MapType;
                        orow["MapGuid"]   = s;
                        orow.Insert();
                        new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_VUser", "RowGuid", RowGuid);
                    }
                }
                foreach (DataRowView row in dv)
                {
                    int count = 0;
                    foreach (string s in strArray)
                    {
                        if (Convert.ToString(row[0]) == s)
                        {
                            count++;
                        }
                    }
                    if (count == 0)
                    {
                        new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_VUser", "MapGuid='" + Convert.ToString(row[0]) + "'and VUserGuid='" + VUserGuid + "'and MapType='OU'", "RowGuid");

                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_VUser where MapGuid='" + Convert.ToString(row[0]) + "'and VUserGuid='" + VUserGuid + "'and MapType='OU'");
                    }
                }
            }
            WriteAjaxMessage("window.close();");
        }
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string str = Convert.ToString(HidRoleList.Value);
            string MatterGuid = Request.QueryString["MatterGuid"];
            DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView("select AllowGuid,RowGuid from RG_Matter_Right where MatterGuid='" + MatterGuid + "'and (AllowType='Role' or AllowType='UserType')");
            if (str.Length == 0)
            {
                new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Matter_Right", "MatterGuid='" + MatterGuid + "'and (AllowType='Role' or AllowType='UserType')", "RowGuid");
                Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Matter_Right where MatterGuid='" + MatterGuid + "'and (AllowType='Role' or AllowType='UserType')");
            }
            else
            {
                str = str.Substring(0, str.Length - 1);
                string[] strArray = str.Split(';');
                foreach (string s in strArray)
                {
                    if (!string.IsNullOrEmpty(s))
                    {
                        string RowGuid = Guid.NewGuid().ToString();
                        Boolean needtoAdd = true;
                        foreach (DataRowView row in dv)
                        {
                            if (Convert.ToString(row["AllowGuid"]) == s.Split('@')[0])
                            {
                                needtoAdd = false;
                            }
                        }
                        if (needtoAdd)
                        {
                            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Matter_Right", RowGuid);
                            orow["MatterGuid"] = MatterGuid;
                            orow["AllowGuid"] = s.Split('@')[0];
                            orow["AllowType"] = s.Split('@')[1];
                            orow.Insert();
                            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Matter_Right", "RowGuid", RowGuid);
                        }
                    }

                }
                foreach (DataRowView row in dv)
                {
                    Boolean needtoDel = true;
                    foreach (string s in strArray)
                    {
                        if (Convert.ToString(row["AllowGuid"]) == s.Split('@')[0])
                        {
                            needtoDel = false;
                        }
                    }
                    if (needtoDel)
                    {
                        new ComDataSyn().DeleteWithKeyValue(DataSynTarget.BackEndToFront, "RG_Matter_Right", "RowGuid", row["RowGuid"].ToString());
                        Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Matter_Right where RowGuid='" + row["RowGuid"].ToString() + "'");
                    }
                }
            }
            SaveAllowToAll();
            WriteAjaxMessage("window.close();");
        }
示例#11
0
 protected void SaveRelation(string VUserGuid)
 {
     string RowGuid = Guid.NewGuid().ToString();
     Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_VUser");
     oRow["RowGuid"] = RowGuid;
     oRow["VUserGuid"] = VUserGuid;
     oRow["MapGuid"] = Session["UserGuid"];
     oRow["MapType"] = "User";
     oRow.Insert();
     new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_VUser", "RowGuid", RowGuid);
 }
示例#12
0
        protected void btnQuickNew_Click(object sender, EventArgs e)
        {
            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_ShortcutMenu", RowGuid);
            orow["ShortcutText"] = "快捷方式名称";
            orow["ShortcutType"] = 1;
            orow["IsBlank"]      = 0;
            orow.Insert();
            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_ShortcutMenu", "RowGuid", RowGuid);
            this.RefreshGrid();
        }
示例#13
0
        protected void SaveRelation(string VUserGuid)
        {
            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_VUser");
            oRow["RowGuid"]   = RowGuid;
            oRow["VUserGuid"] = VUserGuid;
            oRow["MapGuid"]   = Session["UserGuid"];
            oRow["MapType"]   = "User";
            oRow.Insert();
            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_VUser", "RowGuid", RowGuid);
        }
示例#14
0
        protected void btnQuickNew_Click(object sender, EventArgs e)
        {
            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module", RowGuid);
            orow["ParentGuid"]      = Request["ParentGuid"];
            orow["ModuleName"]      = "模块名称";
            orow["IsForbid"]        = 0;
            orow["OrderNum"]        = -1;
            orow["IsBlank"]         = 0;
            orow["IsHidden"]        = 0;
            orow["IsBelongtoBus"]   = 0;
            orow["ModuleAddress"]   = "";
            orow["SmallImgAddress"] = "";
            orow["BigImgAddress"]   = "";
            orow["OperateUserName"] = Session["DisplayName"];
            orow["OperateDate"]     = System.DateTime.Now;
            orow["YearFlag"]        = "";
            orow["HidUrl"]          = "";
            orow["IsBelongtoApp"]   = 0;
            if (Request["ParentGuid"] == "" && rgModule.TopModuleCode("", 4) == "")
            {
                orow["ModuleCode"] = "0001";
            }
            else if (Request["ParentGuid"] == "")
            {
                orow["ModuleCode"] = (Convert.ToInt64(rgModule.TopModuleCode("", 4)) + 1).ToString().PadLeft(4, '0');
            }
            else
            {
                string ParentModuleCode = Epoint.MisBizLogic2.DB.ExecuteToString("select ModuleCode from RG_Module where RowGuid='" + Request["ParentGuid"] + "'");
                int    CodeLength       = ParentModuleCode.Length + 4;
                string LastModuleCode   = rgModule.TopModuleCode(ParentModuleCode, CodeLength);//取得上一个ModuleCode
                if (string.IsNullOrEmpty(LastModuleCode))
                {
                    LastModuleCode = ParentModuleCode + "0000";
                }
                orow["ModuleCode"] = (Convert.ToInt64(LastModuleCode) + 1).ToString().PadLeft(CodeLength, '0');
            }
            if (string.IsNullOrEmpty(Request["AppGuid"]))
            {
                orow["AppGuid"] = "";
            }
            else
            {
                orow["AppGuid"] = Request["AppGuid"];
            }
            orow.Insert();
            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module", "RowGuid", RowGuid);
            this.RefreshGrid();
        }
示例#15
0
 /// <summary>
 /// 保存会员角色信息
 /// </summary>
 protected void SaveUserRole(string rowguid)
 {
     // 添加现有角色信息
     foreach (ListItem item in jpdRoleName.Items)
     {
         if (item.Selected)
         {
             Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User_Role");
             oRow["RGUserGUID"] = rowguid;
             oRow["RoleGuid"]   = item.Value;
             oRow["RowGuid"]    = Guid.NewGuid().ToString();
             oRow.Insert();
         }
     }
     new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_User_Role", "RGUserGUID='" + rowguid + "'", "RowGuid");
 }
示例#16
0
 /// <summary>
 /// 保存单位的单位类别
 /// </summary>
 private void SaveOuType(string ouGuid)
 {
     foreach (ListItem item in cblOUTypeOU.Items)
     {
         if (item.Selected)
         {
             Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OuType_Relate");
             oRow["RelatedGuid"] = ouGuid;
             oRow["OuType"]      = item.Value;
             oRow["RelatedType"] = "Ou";
             oRow["RowGuid"]     = Guid.NewGuid().ToString();
             oRow.Insert();
             //new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_OuType_Relate", "RowGuid", oRow["RowGuid"].ToString());
         }
     }
     new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_OuType_Relate", "RelatedGuid='" + ouGuid + "'", "RowGuid");
 }
 protected void btnQuickNew_Click(object sender, EventArgs e)
 {
     string RowGuid = Guid.NewGuid().ToString();
     Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Application", RowGuid);
     orow["AppGuid"] = RowGuid;
     orow["AppName"] = "��ϵͳ����";
     orow["ShortcutText"] = Convert.ToString(orow["AppName"]);
     orow["IsForbid"] = 0;
     orow["OrderNum"] = -1;
     orow["IsBlank"] = 0;
     orow["IsTopMenu"] = 0;
     orow["AuditedOUVisible"] = 0;
     orow["OperateUserName"] = Convert.ToString(Session["DisplayName"]);
     orow["OperateDate"] = System.DateTime.Now.ToString();
     orow.Insert();
     new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Application", "AppGuid", RowGuid);
     this.RefreshGrid();
 }
示例#18
0
        protected void btnQuickNew_Click(object sender, EventArgs e)
        {
            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Application", RowGuid);
            orow["AppGuid"]          = RowGuid;
            orow["AppName"]          = "子系统名称";
            orow["ShortcutText"]     = Convert.ToString(orow["AppName"]);
            orow["IsForbid"]         = 0;
            orow["OrderNum"]         = -1;
            orow["IsBlank"]          = 0;
            orow["IsTopMenu"]        = 0;
            orow["AuditedOUVisible"] = 0;
            orow["OperateUserName"]  = Convert.ToString(Session["DisplayName"]);
            orow["OperateDate"]      = System.DateTime.Now.ToString();
            orow.Insert();
            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Application", "AppGuid", RowGuid);
            this.RefreshGrid();
        }
示例#19
0
        protected void InsertUser(string LoginID, string DanWeiGuid, string LXR)
        {
            string strSql = "select ZuZhiJGDM from RG_OUInfo where RowGuid='" + DanWeiGuid + "'";

            //ZuZhiJGDM_2020.Text = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
            Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User");
            oRow["OperateDate"] = DateTime.Now.ToString();      //System.DateTime
            oRow["RowGuid"]     = Guid.NewGuid().ToString();    //System.String
            oRow["DispName"]    = LXR;                          //System.String
            oRow["LoginID"]     = LoginID;                      //System.String
            oRow["Password"]    = common.authPassword(LoginID); //System.String
            oRow["EnableSMS"]   = "0";                          //System.String
            oRow["IsValid"]     = "1";                          //System.String
            oRow["DanWeiGuid"]  = DanWeiGuid;
            oRow["UserStatus"]  = "002";                        //System.Stringg
            oRow["DelFlag"]     = "0";                          //System.Int32
            oRow["ZuZhiJGDM"]   = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
            oRow.Insert();
        }
示例#20
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < Datagrid1.Items.Count; i++)
            {
                TextBox txtName     = (TextBox)Datagrid1.Items[i].FindControl("txtName");
                TextBox txtAddress  = (TextBox)Datagrid1.Items[i].FindControl("txtAddress");
                TextBox txtOrderNum = (TextBox)Datagrid1.Items[i].FindControl("txtOrderNum");
                string  gd          = Convert.ToString(Datagrid1.DataKeys[i]);
                Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module", gd);
                orow["ModuleName"]    = txtName.Text;
                orow["ModuleAddress"] = txtAddress.Text;
                orow["OrderNum"]      = txtOrderNum.Text;
                orow.Update();
                new ComDataSyn().UpdateWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module", "RowGuid", gd);


                string   ModuleGuid    = gd;
                bool     isExists      = Epoint.MisBizLogic2.DB.ExecuteToInt("select COUNT(*) FROM RG_Module_Right WHERE AllowGuid='All' and ModuleGuid='" + ModuleGuid + "'") > 0;
                CheckBox chkAllowToAll = (CheckBox)Datagrid1.Items[i].FindControl("chkAdd2");
                if (chkAllowToAll.Checked)
                {
                    // 添加完全公开的配置
                    // 判断是否存在,如果存在,不需要添加配置
                    if (!isExists)
                    {
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow orow2 = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module_Right", RowGuid);
                        orow2["ModuleGuid"] = ModuleGuid;
                        orow2["AllowGuid"]  = "All";
                        orow2["AllowType"]  = "";
                        orow2.Insert();
                        new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module_Right", "RowGuid", RowGuid);
                    }
                }
                else
                {
                    // 删除完全公开的配置
                    new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Module_Right", "AllowGuid='All'and ModuleGuid='" + ModuleGuid + "'", "RowGuid");
                    Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right WHERE AllowGuid='All'and ModuleGuid='" + ModuleGuid + "'");
                }
            }
        }
示例#21
0
        protected void btnQuickNew_Click(object sender, EventArgs e)
        {
            string RowGuid = Guid.NewGuid().ToString();

            Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Matters", RowGuid);
            orow["ParentGuid"]      = ParentGuid;
            orow["MatterName"]      = "事项名称";
            orow["InstrUrl"]        = "";
            orow["IsForbidden"]     = 0;
            orow["OrderNum"]        = -1;
            orow["IsBlank"]         = 0;
            orow["IsHidden"]        = 0;
            orow["AppGuid"]         = "";
            orow["OperateUserName"] = Session["DisplayName"];
            orow["OperateDate"]     = System.DateTime.Now.ToString();
            orow.Insert();
            new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Matters", "RowGuid", RowGuid);
            AlertAjaxMessage("快速新建成功!");
            this.RefreshGrid();
        }
示例#22
0
        /// <summary>
        /// 附件上传
        /// </summary>
        private void uploadFiles(string fileName, string EntityRowGuid)
        {
            Epoint.MisBizLogic2.Web.AddPage     oAddPage = new Epoint.MisBizLogic2.Web.AddPage(fileTableID);
            Epoint.MisBizLogic2.Data.MisGuidRow oRow;

            HttpPostedFile upFileName    = HttpContext.Current.Request.Files[fileName];
            string         strAttachGuid = "";

            if (upFileName != null)
            {
                if (upFileName.ContentLength > 0)
                {
                    string[] filesplit   = upFileName.FileName.Split('\\');//分析文件名称
                    string   filename    = filesplit[filesplit.Length - 1];
                    byte[]   fileContent = new byte[upFileName.ContentLength];
                    upFileName.InputStream.Read(fileContent, 0, upFileName.ContentLength);
                    strAttachGuid = Guid.NewGuid().ToString();

                    //oAddPage.SaveTableValues(strAttachGuid, tdContainer, Request.QueryString["ParentRowGuid"]);

                    //本地表中插入附件信息
                    #region 插入附件信息
                    oRow                           = new Epoint.MisBizLogic2.Data.MisGuidRow(Com.GetTableNameByID(fileTableID));
                    oRow["RowGuid"]                = strAttachGuid;
                    oRow["pic_FuJian"]             = fileContent;
                    oRow["pic_FuJian_ContentType"] = upFileName.ContentType;
                    oRow["pic_FuJian_FileName"]    = filename;
                    oRow["d_UploadDate"]           = DateTime.Now.AddSeconds(-1);//为了配合版本查询 add by xuz
                    oRow["EntityRowGuid"]          = EntityRowGuid;
                    oRow["i_delete"]               = 0;
                    oRow.Insert();

                    #endregion

                    upFileName.InputStream.Close();
                }
            }
        }
示例#23
0
 protected void btnQuickNew_Click(object sender, EventArgs e)
 {
     string RowGuid = Guid.NewGuid().ToString();
     Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Matters", RowGuid);
     orow["ParentGuid"] = ParentGuid;
     orow["MatterName"] = "��������";
     orow["InstrUrl"] = "";
     orow["IsForbidden"] = 0;
     orow["OrderNum"] = -1;
     orow["IsBlank"] = 0;
     orow["IsHidden"] = 0;
     orow["AppGuid"] = "";
     orow["OperateUserName"] = Session["DisplayName"];
     orow["OperateDate"] = System.DateTime.Now.ToString();
     orow.Insert();
     new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Matters", "RowGuid", RowGuid);
     AlertAjaxMessage("�����½��ɹ���");
     this.RefreshGrid();
 }
示例#24
0
        private void LoginRecord()
        {
            int EnableDays;
            // EnableDays = Convert.ToInt32(Epoint.Frame.Bizlogic.Frame_Config.GetConfigValue("RGLoginEnableTime","180"));
            EnableDays = Convert.ToInt32(System.Configuration.ConfigurationManager.AppSettings["RGLoginEnableTime"]);
            if (EnableDays == 0)
                EnableDays = 180;//默认距当前180天
            Database db = DatabaseFactory.CreateDatabase("EpointMis_ConnectionString");
            DateTime dt = DateTime.Now.AddDays(0 - EnableDays);
            // 清除离现在较久的登陆记录,防止RG_Login表过大
            string strSql = ((db.DbProviderFactory.ToString() != "System.Data.OracleClient.OracleClientFactory") ?
                "DELETE FROM RG_Login WHERE LoginTime<@LoginTime" :
                "DELETE FROM RG_Login WHERE LoginTime<:LoginTime");
            DbCommand cmd = db.GetSqlStringCommand(strSql);
            db.AddInParameter(cmd, "LoginTime", DbType.DateTime, dt);
            db.ExecuteNonQuery(cmd);

            string RowGuid = Guid.NewGuid().ToString();
            Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
            oRow["RGGuid"] = rgUser.GetCurrentRegisterUser().RegisterUserGuid;
            oRow["LoginTime"] = System.DateTime.Now.ToString();
            oRow["IsLoginSuccess"] = 1;
            oRow["Message"] = "成功登陆";
            oRow.Insert();
        }
示例#25
0
        protected void LoginSys_Click(object sender, ImageClickEventArgs e)
        {
            // 判断验证码是否正确

            if (Request.Cookies["checkCode"].Value.ToLower() != userauthcode.Value.Trim().ToLower())
            {
                AlertAjaxMessage("您输入的验证码不正确!!");
                //CreatImg();
                WriteAjaxMessage("window.location=window.location;");
                return;
            }
            //}

            //string Hurl = Request.Url.Host;
            //if(Hurl

            //判断当前用户是否能正常登录
            string RegisterUserRow_ID = "";

            Session["USBKeyLogin"] = "******";
            string strSql = "select * from RG_User where LoginID='" + account.Value + "' and IsValid='0' and DelStatus='1' and DelFlag='1' ";
            //if (ViewState["LoginNeedVlidate"].ToString() == "1")
            //{
            //    strSql += " and VerifyCode is not null";
            //}
            //判断是否是未激活的账号
            DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
            Boolean needActivate = dv.Count > 0;
            if (needActivate)
            {
                //string url = "RG_UserActivation.aspx?UserGuid=" + dv[0]["RowGuid"].ToString();
                AlertAjaxMessage("本帐号未激活,请联系管理员");
                return;
            }
            //判断有没有加密锁,如果有的话,就提示用加密锁登录
            strSql = "select PINCode from RG_User where LoginID='" + account.Value + "' ";
            string PINCode = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
            if (PINCode.Length > 0)
            {
                //WriteAjaxMessage("alert('您已经有加密锁,请通过加密锁登录!');");
                //WriteAjaxMessage("window.location='epasslogin.aspx';");
                //return;
            }
            //判断当前用户是否已经配置key,如果已配置,则检查当前系统是否启用了key,如果启用了key,再检查是否配置了不运行普通登录
            RegisterUserRow_ID = rgUser.RegisterUserLogin(account.Value, common.authPassword(password.Value));

            if (RegisterUserRow_ID == "")
            {
                #region      登录失败情况下,给用户的提示
                if (Convert.ToInt32(ViewState["LoginErrorTimes"]) != 0)
                {
                    if (Convert.ToInt32(ViewState["ErrorTimes"]) >= Convert.ToInt32(ViewState["LoginErrorTimes"]))
                    {
                        WriteAjaxMessage("alert('您的密码或者验证码已经输错超过了3次,系统将自动关闭!');window.close();");
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
                        oRow["RGGuid"] = account.Value;
                        oRow["LoginTime"] = System.DateTime.Now.ToString();
                        oRow["IsLoginSuccess"] = 0;
                        oRow["Message"] = "" + account.Value + "的密码或验证码输错了3次,系统自动关闭!";
                        oRow.Insert();
                        return;
                    }
                    else
                    {
                        AlertAjaxMessage("系统不能完成您的登录请求,请检查您的用户名和密码是否匹配!");
                        WriteAjaxMessage("window.location=window.location;");
                    }

                    ViewState["ErrorTimes"] = Convert.ToInt32(ViewState["ErrorTimes"]) + 1;
                    //if (ViewState["LoginNeedVlidate"].ToString() == "1")
                    //    CreatImg();
                    return;
                }
                else
                {

                    AlertAjaxMessage("系统不能完成您的登录请求,请检查您的用户名和密码是否匹配!");
                    WriteAjaxMessage("window.location=window.location;");
                    //if (ViewState["LoginNeedVlidate"].ToString() == "1")
                    //    CreatImg();
                    return;
                }
                #endregion
            }
            else
            {
                //RG_Login(RegisterUserRow_ID, txtUserName.Value);
                RG_Login(account.Value);
            }
        }
示例#26
0
        private void data1change()
        {
            string ePassNDstring = ConfigurationManager.AppSettings["ePassND"];

            userPin = "";
            string RandomData   = Session["Message"].ToString();
            string userSN       = Request["SN_SERAL"];
            string clientdigest = Request["Digest"];
            string PassWord     = Request["PassWord"];

            string Key1          = "01234567890123456";
            string Key2          = "01234567890123456";
            string ServerDigest  = "01234567890123456";
            object oKey1         = (string)Key1;
            object oKey2         = (string)Key2;
            object oServerDigest = (string)ServerDigest;
            string LoginID       = "";

            //SqlConnection ConnEpassND;
            //ConnEpassND = new SqlConnection(ePassNDstring);
            //string sql = "SELECT * From [Projects_Users] where ePassND_KeySerialNumber ='" + userSN + "'";
            //SqlCommand myCMD = new SqlCommand(sql, ConnEpassND);
            //ConnEpassND.Open();
            //SqlDataReader myReader = myCMD.ExecuteReader();
            //if (myReader.Read())
            //{
            //    userPin = myReader["ePassND_KeyPinNumber"].ToString();//从Projects_Users表中读取ePassND_KeyPinNumber字段信息(ePassND_KeyPinNumber是加密锁的pin码)
            //    userSourceID = myReader["Source_Project_UserID"].ToString();//从Projects_Users表中读取Source_Project_UserID字段信息(Source_Project_UserID是OA系统的原来的用户登陆名)
            //}
            //myReader.Close();
            //ConnEpassND.Close();

            //string loginID = userSourceID.Trim();
            //string userpwd = userPin.Trim();

            //判断当前用户是否能正常登录
            string RegisterUserRow_ID = "";

            Session["USBKeyLogin"] = "******";
            string strSql = "select * from RG_User where PINCode='" + userSN + "' and PassWord='******' and IsValid='0' and DelStatus='1' and DelFlag='1' ";

            //判断是否是未激活的账号
            DataView dv           = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
            Boolean  needActivate = dv.Count > 0;

            if (needActivate)
            {
                //string url = "RG_UserActivation.aspx?UserGuid=" + dv[0]["RowGuid"].ToString();
                AlertAjaxMessage("本帐号未激活,请联系管理员");
                return;
            }
            strSql = "select * from RG_User where PINCode='" + userSN + "' and PassWord='******' ";
            DataView dv2 = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);

            if (dv2.Count > 0)
            {
                //判断当前用户是否已经配置key,如果已配置,则检查当前系统是否启用了key,如果启用了key,再检查是否配置了不运行普通登录
                LoginID            = dv2[0]["loginID"].ToString();
                RegisterUserRow_ID = rgUser.RegisterUserLogin(LoginID, dv2[0]["Password"].ToString());
            }

            if (RegisterUserRow_ID == "")
            {
                #region      登录失败情况下,给用户的提示
                if (Convert.ToInt32(ViewState["LoginErrorTimes"]) != 0)
                {
                    if (Convert.ToInt32(ViewState["ErrorTimes"]) >= Convert.ToInt32(ViewState["LoginErrorTimes"]))
                    {
                        WriteAjaxMessage("alert('您的密码已经输错超过了3次,系统将自动关闭!');window.close();");
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
                        oRow["RGGuid"]         = LoginID;
                        oRow["LoginTime"]      = System.DateTime.Now.ToString();
                        oRow["IsLoginSuccess"] = 0;
                        oRow["Message"]        = "" + LoginID + "的PIN密码输错了3次,系统自动关闭!";
                        oRow.Insert();
                        return;
                    }
                    else
                    {
                        AlertAjaxMessage("系统不能完成您的登录请求,请检查您的密码是否正确!");
                        WriteAjaxMessage("window.location='epasslogin.aspx';");
                    }

                    ViewState["ErrorTimes"] = Convert.ToInt32(ViewState["ErrorTimes"]) + 1;

                    return;
                }
                else
                {
                    AlertAjaxMessage("系统不能完成您的登录请求,请检查您的密码是否正确!");
                    WriteAjaxMessage("window.location='epasslogin.aspx';");

                    return;
                }
                #endregion
            }
            else
            {
                RG_Login(LoginID);
            }
        }
        protected void savbtn_Click(object sender, EventArgs e)
        {
            string AllowTo = ViewState["AllowTo"].ToString();

            //删除此会员单位原有配置的所有的快捷方式
            Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_ShortcutMenu_Right where AllowGuid='" + AllowTo + "'and AllowType='OUType'");
            new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "AllowGuid='" + AllowTo + "'and AllowType='OUType'", "RowGuid");

            //保存有权限的快捷方式
            string strSelectMoGuid = HidShortcutGuid.Value;
            string[] ShortcutGuisLst = strSelectMoGuid.Split(';');
            string ShortcutGuid = "";
            for (int i = 0; i < ShortcutGuisLst.Length; i++)
            {
                ShortcutGuid = ShortcutGuisLst[i];
                if (ShortcutGuid != "")
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_ShortcutMenu_Right");
                    oRow["RowGuid"] = RowGuid;
                    oRow["ShortcutGuid"] = ShortcutGuid;
                    oRow["AllowGuid"] = AllowTo;
                    oRow["AllowType"] = "OUType";
                    oRow.Insert();
                }
            }
            new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_ShortcutMenu_Right", "AllowGuid='" + AllowTo + "'and AllowType='OUType'", "RowGuid");

            WriteAjaxMessage("alert('权限设置成功!');rtnValue('');");
        }
示例#28
0
        /// <summary>
        /// 保存材料内容
        /// </summary>
        public void Save()
        {
            Epoint.MisBizLogic2.Data.MisGuidRow oRow;

            string RowGuid;

            string[] arrFileIndex = txtFileIndex.Text.Split('|');
            //判断是否是空
            StringBuilder sb = new StringBuilder();

            foreach (string fileIndex in arrFileIndex)
            {
                if (fileIndex != "")
                {
                    //上传附件
                    sb.Append(CheckFilesIsEmpty("attachfile" + fileIndex));
                }
            }
            if (sb.Length > 0)
            {
                //Parent.Page.ClientScript.RegisterStartupScript(this.GetType(), "2", string.Format("<script>alert('{0}');</script>", sb.ToString()));
                Response.Write("<Script   language='javascript'>");

                Response.Write(string.Format("alert('{0}');", sb.ToString()));

                Response.Write("</script>");
                //return;
            }
            if (Convert.ToString(ViewState["IsSaved"]) != "1")
            {
                RowGuid = Guid.NewGuid().ToString();
                //新材料的添加
                oRow                   = new Epoint.MisBizLogic2.Data.MisGuidRow(Com.GetTableNameByID(TableID));
                oRow["RowGuid"]        = RowGuid;
                oRow["ConfigRowGuid"]  = Convert.ToString(ViewState["ConfigRowGuid"]);
                oRow["MisTableID"]     = Convert.ToInt32(ViewState["MisTableID"]);
                oRow["MisRowGuid"]     = Convert.ToString(ViewState["MisRowGuid"]);
                oRow["ProjectGuid"]    = Convert.ToString(ViewState["ProjectGuid"]);
                oRow["Comment"]        = Convert.ToString(ViewState["Comment"]);
                oRow["s_YeWuMC"]       = Convert.ToString(ViewState["YeWuMC"]);
                oRow["s_ShiFouTiJiao"] = "1";
                oRow["d_TiJiaoSJ"]     = DateTime.Now.AddSeconds(-1).ToString();

                oRow.Insert();
            }
            else
            {
                RowGuid = ViewState["RowGuid"].ToString();
            }


            foreach (string fileIndex in arrFileIndex)
            {
                if (fileIndex != "")
                {
                    //上传附件
                    uploadFiles("attachfile" + fileIndex, RowGuid);
                }
            }
            this.RefreshGrid();
        }
示例#29
0
        /// <summary>
        /// �����������
        /// </summary>
        public void Save()
        {
            Epoint.MisBizLogic2.Data.MisGuidRow oRow;

            string RowGuid;
            string[] arrFileIndex = txtFileIndex.Text.Split('|');
            //�ж��Ƿ��ǿ�
            StringBuilder sb = new StringBuilder();
            foreach (string fileIndex in arrFileIndex)
            {
                if (fileIndex != "")
                {
                    //�ϴ�����
                    sb.Append(CheckFilesIsEmpty("attachfile" + fileIndex));
                }
            }
            if (sb.Length > 0)
            {
                //Parent.Page.ClientScript.RegisterStartupScript(this.GetType(), "2", string.Format("<script>alert('{0}');</script>", sb.ToString()));
                Response.Write("<Script   language='javascript'>");

                Response.Write(string.Format("alert('{0}');", sb.ToString()));

                Response.Write("</script>");
                //return;
            }
            if (Convert.ToString(ViewState["IsSaved"]) != "1")
            {
                RowGuid = Guid.NewGuid().ToString();
                //�²��ϵ����
                oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(Com.GetTableNameByID(TableID));
                oRow["RowGuid"] = RowGuid;
                oRow["ConfigRowGuid"] = Convert.ToString(ViewState["ConfigRowGuid"]);
                oRow["MisTableID"] = Convert.ToInt32(ViewState["MisTableID"]);
                oRow["MisRowGuid"] = Convert.ToString(ViewState["MisRowGuid"]);
                oRow["ProjectGuid"] = Convert.ToString(ViewState["ProjectGuid"]);
                oRow["Comment"] = Convert.ToString(ViewState["Comment"]);
                oRow["s_YeWuMC"] = Convert.ToString(ViewState["YeWuMC"]);
                oRow["s_ShiFouTiJiao"] = "1";
                oRow["d_TiJiaoSJ"] = DateTime.Now.AddSeconds(-1).ToString();

                oRow.Insert();
            }
            else
            {
                RowGuid = ViewState["RowGuid"].ToString();
            }

            foreach (string fileIndex in arrFileIndex)
            {
                if (fileIndex != "")
                {
                    //�ϴ�����
                    uploadFiles("attachfile" + fileIndex, RowGuid);
                }
            }
            this.RefreshGrid();
        }
示例#30
0
 protected void btnQuickNew_Click(object sender, EventArgs e)
 {
     string RowGuid = Guid.NewGuid().ToString();
     Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_ShortcutMenu", RowGuid);
     orow["ShortcutText"] = "快捷方式名称";
     orow["ShortcutType"] = 1;
     orow["IsBlank"] = 0;
     orow.Insert();
     new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_ShortcutMenu", "RowGuid", RowGuid);
     this.RefreshGrid();
 }
        protected void savbtn_Click(object sender, EventArgs e)
        {
            //string AllowType = ViewState["AllowType"].ToString();
            string AllowTo = ViewState["AllowTo"].ToString();

            //删除此用户原有配置的所有的模块
            //ModuleRights.Delete_Type(AllowTo, AllowType);
            Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right where AllowGuid='" + ViewState["AllowTo"].ToString() + "'and AllowType='OUType'");

            //返回的模块列表包含其他独立管理部门设置的模块
            string strSelectMoGuid = HidModuleGuid.Value;
            string[] moduleGuisLst = strSelectMoGuid.Split(';');
            string moduleGuid = "";
            for (int i = 0; i < moduleGuisLst.Length; i++)
            {
                moduleGuid = moduleGuisLst[i];
                if (moduleGuid != "")
                //ModuleRights.ModuleRight_Insert(moduleGuid, AllowTo, AllowType);
                {
                    string RowGuid = Guid.NewGuid().ToString();
                    Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module_Right");
                    oRow["RowGuid"] = RowGuid;
                    oRow["ModuleGuid"] = moduleGuid;
                    oRow["AllowGuid"] = ViewState["AllowTo"];
                    oRow["AllowType"] = "OUType";
                    oRow.Insert();
                }
            }
            WriteAjaxMessage("alert('权限设置成功!');rtnValue('');");
        }
示例#32
0
 protected void InsertUser(string LoginID, string DanWeiGuid,string LXR)
 {
     string strSql = "select ZuZhiJGDM from RG_OUInfo where RowGuid='" + DanWeiGuid + "'";
     //ZuZhiJGDM_2020.Text = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
     Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User");
     oRow["OperateDate"] = DateTime.Now.ToString();//System.DateTime
     oRow["RowGuid"] = Guid.NewGuid().ToString();//System.String
     oRow["DispName"] = LXR;//System.String
     oRow["LoginID"] = LoginID;//System.String
     oRow["Password"] = common.authPassword(LoginID);//System.String
     oRow["EnableSMS"] = "0";//System.String
     oRow["IsValid"] = "1";//System.String
     oRow["DanWeiGuid"] = DanWeiGuid;
     oRow["UserStatus"] = "002";//System.Stringg
     oRow["DelFlag"] = "0";//System.Int32
     oRow["ZuZhiJGDM"] = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);
     oRow.Insert();
 }
示例#33
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            for (int i = 0; i < Datagrid1.Items.Count; i++)
            {
                TextBox txtName = (TextBox)Datagrid1.Items[i].FindControl("txtName");
                TextBox txtAddress = (TextBox)Datagrid1.Items[i].FindControl("txtAddress");
                TextBox txtOrderNum = (TextBox)Datagrid1.Items[i].FindControl("txtOrderNum");
                string gd = Convert.ToString(Datagrid1.DataKeys[i]);
                Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module", gd);
                orow["ModuleName"] = txtName.Text;
                orow["ModuleAddress"] = txtAddress.Text;
                orow["OrderNum"] = txtOrderNum.Text;
                orow.Update();
                new ComDataSyn().UpdateWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module", "RowGuid", gd);

                string ModuleGuid = gd;
                bool isExists = Epoint.MisBizLogic2.DB.ExecuteToInt("select COUNT(*) FROM RG_Module_Right WHERE AllowGuid='All' and ModuleGuid='" + ModuleGuid + "'") > 0;
                CheckBox chkAllowToAll = (CheckBox)Datagrid1.Items[i].FindControl("chkAdd2");
                if (chkAllowToAll.Checked)
                {
                    // �����ȫ����������
                    // �ж��Ƿ����,�������,����Ҫ�������
                    if (!isExists)
                    {
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow orow2 = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module_Right", RowGuid);
                        orow2["ModuleGuid"] = ModuleGuid;
                        orow2["AllowGuid"] = "All";
                        orow2["AllowType"] = "";
                        orow2.Insert();
                        new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module_Right", "RowGuid", RowGuid);
                    }
                }
                else
                {
                    // ɾ����ȫ����������
                    new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Module_Right", "AllowGuid='All'and ModuleGuid='" + ModuleGuid + "'", "RowGuid");
                    Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Module_Right WHERE AllowGuid='All'and ModuleGuid='" + ModuleGuid + "'");
                }
            }
        }
示例#34
0
        private void data1change()
        {
            string ePassNDstring = ConfigurationManager.AppSettings["ePassND"];
            userPin = "";
            string RandomData = Session["Message"].ToString();
            string userSN = Request["SN_SERAL"];
            string clientdigest = Request["Digest"];
            string PassWord = Request["PassWord"];

            string Key1 = "01234567890123456";
            string Key2 = "01234567890123456";
            string ServerDigest = "01234567890123456";
            object oKey1 = (string)Key1;
            object oKey2 = (string)Key2;
            object oServerDigest = (string)ServerDigest;
            string LoginID = "";

            //SqlConnection ConnEpassND;
            //ConnEpassND = new SqlConnection(ePassNDstring);
            //string sql = "SELECT * From [Projects_Users] where ePassND_KeySerialNumber ='" + userSN + "'";
            //SqlCommand myCMD = new SqlCommand(sql, ConnEpassND);
            //ConnEpassND.Open();
            //SqlDataReader myReader = myCMD.ExecuteReader();
            //if (myReader.Read())
            //{
            //    userPin = myReader["ePassND_KeyPinNumber"].ToString();//��Projects_Users���ж�ȡePassND_KeyPinNumber�ֶ���Ϣ(ePassND_KeyPinNumber�Ǽ�������pin��)
            //    userSourceID = myReader["Source_Project_UserID"].ToString();//��Projects_Users���ж�ȡSource_Project_UserID�ֶ���Ϣ(Source_Project_UserID��OAϵͳ��ԭ�����û���½��)
            //}
            //myReader.Close();
            //ConnEpassND.Close();

            //string loginID = userSourceID.Trim();
            //string userpwd = userPin.Trim();

            //�жϵ�ǰ�û��Ƿ���������¼
            string RegisterUserRow_ID = "";

            Session["USBKeyLogin"] = "******";
            string strSql = "select * from RG_User where PINCode='" + userSN + "' and PassWord='******' and IsValid='0' and DelStatus='1' and DelFlag='1' ";

            //�ж��Ƿ���δ������˺�
            DataView dv = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
            Boolean needActivate = dv.Count > 0;
            if (needActivate)
            {
                //string url = "RG_UserActivation.aspx?UserGuid=" + dv[0]["RowGuid"].ToString();
                AlertAjaxMessage("���ʺ�δ�������ϵ����Ա");
                return;
            }
            strSql = "select * from RG_User where PINCode='" + userSN + "' and PassWord='******' ";
            DataView dv2 = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
            if (dv2.Count > 0)
            {
                //�жϵ�ǰ�û��Ƿ��Ѿ�����key����������ã����鵱ǰϵͳ�Ƿ�������key�����������key���ټ���Ƿ������˲�������ͨ��¼
                LoginID = dv2[0]["loginID"].ToString();
                RegisterUserRow_ID = rgUser.RegisterUserLogin(LoginID, dv2[0]["Password"].ToString());

            }

            if (RegisterUserRow_ID == "")
            {
                #region      ��¼ʧ������£����û�����ʾ
                if (Convert.ToInt32(ViewState["LoginErrorTimes"]) != 0)
                {
                    if (Convert.ToInt32(ViewState["ErrorTimes"]) >= Convert.ToInt32(ViewState["LoginErrorTimes"]))
                    {
                        WriteAjaxMessage("alert('���������Ѿ���������3�Σ�ϵͳ���Զ��رգ�');window.close();");
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
                        oRow["RGGuid"] = LoginID;
                        oRow["LoginTime"] = System.DateTime.Now.ToString();
                        oRow["IsLoginSuccess"] = 0;
                        oRow["Message"] = "" + LoginID + "��PIN���������3�Σ�ϵͳ�Զ��رգ�";
                        oRow.Insert();
                        return;
                    }
                    else
                    {
                        AlertAjaxMessage("ϵͳ����������ĵ�¼�����������������Ƿ���ȷ��");
                        WriteAjaxMessage("window.location='epasslogin.aspx';");
                    }

                    ViewState["ErrorTimes"] = Convert.ToInt32(ViewState["ErrorTimes"]) + 1;

                    return;
                }
                else
                {

                    AlertAjaxMessage("ϵͳ����������ĵ�¼�����������������Ƿ���ȷ��");
                    WriteAjaxMessage("window.location='epasslogin.aspx';");

                    return;
                }
                #endregion
            }
            else
            {
                RG_Login(LoginID);
            }
        }
示例#35
0
 /// <summary>
 /// 保存审核意见
 /// </summary>
 /// <param name="FRowGuid"></param>
 /// <param name="UserName"></param>
 /// <param name="SHOpinion"></param>
 /// <param name="OtherGuid"></param>
 public void InsertSHOpinion(object FRowGuid, object UserName, string SHOpinion, object OtherGuid)
 {
     Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("ShenHeInfo");
     oRow["RowGuid"] = Guid.NewGuid().ToString();
     oRow["OperateUserName"] = UserName;
     oRow["OperateDate"] = DateTime.Now.ToString();
     oRow["SHOpinion"] = SHOpinion;
     oRow["FRowGuid"] = FRowGuid;
     oRow["OtherGuid"] = OtherGuid;
     oRow.Insert();
 }
 protected void SaveAllowToAll()
 {
     string AppGuid = Request.QueryString["AppGuid"];
     bool isExists = Epoint.MisBizLogic2.DB.ExecuteToInt("select COUNT(*) FROM RG_Application_Right WHERE AllowGuid='All' and AppGuid='" + AppGuid + "'") > 0;
     if (chkAllowToAll.Checked)
     {
         // 添加完全公开的配置
         // 判断是否存在,如果存在,不需要添加配置
         if (!isExists)
         {
             string RowGuid = Guid.NewGuid().ToString();
             Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Application_Right", RowGuid);
             orow["AppGuid"] = AppGuid;
             orow["AllowGuid"] = "All";
             orow["AllowType"] = "";
             //orow["AppType"] = Request["AppType"];
             orow.Insert();
             new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Application_Right", "RowGuid", RowGuid);
         }
     }
     else
     {
         // 删除完全公开的配置
         new ComDataSyn().DeleteWithCondition(DataSynTarget.BackEndToFront, "RG_Application_Right", "AllowGuid='All'and AppGuid='" + AppGuid + "'", "RowGuid");
         Epoint.MisBizLogic2.DB.ExecuteNonQuery("delete from RG_Application_Right WHERE AllowGuid='All'and AppGuid='" + AppGuid + "'");
     }
 }
示例#37
0
        /// <summary>
        /// �����ϴ�
        /// </summary>
        private void uploadFiles(string fileName, string EntityRowGuid)
        {
            Epoint.MisBizLogic2.Web.AddPage oAddPage = new Epoint.MisBizLogic2.Web.AddPage(fileTableID);
            Epoint.MisBizLogic2.Data.MisGuidRow oRow;

            HttpPostedFile upFileName = HttpContext.Current.Request.Files[fileName];
            string strAttachGuid = "";

            if (upFileName != null)
            {
                if (upFileName.ContentLength > 0)
                {
                    string[] filesplit = upFileName.FileName.Split('\\');//�����ļ�����
                    string filename = filesplit[filesplit.Length - 1];
                    byte[] fileContent = new byte[upFileName.ContentLength];
                    upFileName.InputStream.Read(fileContent, 0, upFileName.ContentLength);
                    strAttachGuid = Guid.NewGuid().ToString();

                    //oAddPage.SaveTableValues(strAttachGuid, tdContainer, Request.QueryString["ParentRowGuid"]);

                    //���ر��в��븽����Ϣ
                    #region ���븽����Ϣ
                    oRow = new Epoint.MisBizLogic2.Data.MisGuidRow(Com.GetTableNameByID(fileTableID));
                    oRow["RowGuid"] = strAttachGuid;
                    oRow["pic_FuJian"] = fileContent;
                    oRow["pic_FuJian_ContentType"] = upFileName.ContentType;
                    oRow["pic_FuJian_FileName"] = filename;
                    oRow["d_UploadDate"] = DateTime.Now.AddSeconds(-1);//Ϊ����ϰ汾��ѯ add by xuz
                    oRow["EntityRowGuid"] = EntityRowGuid;
                    oRow["i_delete"] = 0;
                    oRow.Insert();

                    #endregion

                    upFileName.InputStream.Close();
                }
            }
        }
示例#38
0
 protected void btnQuickNew_Click(object sender, EventArgs e)
 {
     string RowGuid = Guid.NewGuid().ToString();
     Epoint.MisBizLogic2.Data.MisGuidRow orow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Module", RowGuid);
     orow["ParentGuid"] = Request["ParentGuid"];
     orow["ModuleName"] = "ģ������";
     orow["IsForbid"] = 0;
     orow["OrderNum"] = -1;
     orow["IsBlank"] = 0;
     orow["IsHidden"] = 0;
     orow["IsBelongtoBus"] = 0;
     orow["ModuleAddress"] = "";
     orow["SmallImgAddress"] = "";
     orow["BigImgAddress"] = "";
     orow["OperateUserName"] = Session["DisplayName"];
     orow["OperateDate"] = System.DateTime.Now;
     orow["YearFlag"] = "";
     orow["HidUrl"] = "";
     orow["IsBelongtoApp"] = 0;
     if (Request["ParentGuid"] == "" && rgModule.TopModuleCode("", 4) == "")
         orow["ModuleCode"] = "0001";
     else if (Request["ParentGuid"] == "")
         orow["ModuleCode"] = (Convert.ToInt64(rgModule.TopModuleCode("", 4)) + 1).ToString().PadLeft(4, '0');
     else
     {
         string ParentModuleCode = Epoint.MisBizLogic2.DB.ExecuteToString("select ModuleCode from RG_Module where RowGuid='" + Request["ParentGuid"] + "'");
         int CodeLength = ParentModuleCode.Length + 4;
         string LastModuleCode = rgModule.TopModuleCode(ParentModuleCode, CodeLength);//ȡ����һ��ModuleCode
         if (string.IsNullOrEmpty(LastModuleCode))
             LastModuleCode = ParentModuleCode + "0000";
         orow["ModuleCode"] = (Convert.ToInt64(LastModuleCode) + 1).ToString().PadLeft(CodeLength, '0');
     }
     if (string.IsNullOrEmpty(Request["AppGuid"]))
         orow["AppGuid"] = "";
     else
         orow["AppGuid"] = Request["AppGuid"];
     orow.Insert();
     new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_Module", "RowGuid", RowGuid);
     this.RefreshGrid();
 }
示例#39
0
 /// <summary>
 /// �����Ա��ɫ��Ϣ
 /// </summary>
 protected void SaveUserRole(string rowguid)
 {
     // ������н�ɫ��Ϣ
     foreach (ListItem item in jpdRoleName.Items)
     {
         if (item.Selected)
         {
             Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_User_Role");
             oRow["RGUserGUID"] = rowguid;
             oRow["RoleGuid"] = item.Value;
             oRow["RowGuid"] = Guid.NewGuid().ToString();
             oRow.Insert();
         }
     }
     new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_User_Role", "RGUserGUID='" + rowguid + "'", "RowGuid");
 }
示例#40
0
 /// <summary>
 /// �����Ա�ĵ�λ���
 /// </summary>
 private void SaveOuTypeForUser(string rgUserGuid)
 {
     foreach (ListItem item in cblOUType.Items)
     {
         if (item.Selected)
         {
             Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_OuType_Relate");
             oRow["RelatedGuid"] = rgUserGuid;
             oRow["OuType"] = item.Value;
             oRow["RelatedType"] = "User";
             oRow["RowGuid"] = Guid.NewGuid().ToString();
             oRow.Insert();
             //new ComDataSyn().InsertWithKeyValue(DataSynTarget.BackEndToFront, "RG_OuType_Relate", "RowGuid", oRow["RowGuid"].ToString());
         }
     }
     new ComDataSyn().InsertWithCondition(DataSynTarget.BackEndToFront, "RG_OuType_Relate", "RelatedGuid='" + rgUserGuid + "'", "RowGuid");
 }
示例#41
0
        protected void LoginSys_Click(object sender, ImageClickEventArgs e)
        {
            // 判断验证码是否正确

            if (Request.Cookies["checkCode"].Value.ToLower() != userauthcode.Value.Trim().ToLower())
            {
                AlertAjaxMessage("您输入的验证码不正确!!");
                //CreatImg();
                WriteAjaxMessage("window.location=window.location;");
                return;
            }
            //}

            //string Hurl = Request.Url.Host;
            //if(Hurl

            //判断当前用户是否能正常登录
            string RegisterUserRow_ID = "";

            Session["USBKeyLogin"] = "******";
            string strSql = "select * from RG_User where LoginID='" + account.Value + "' and IsValid='0' and DelStatus='1' and DelFlag='1' ";
            //if (ViewState["LoginNeedVlidate"].ToString() == "1")
            //{
            //    strSql += " and VerifyCode is not null";
            //}
            //判断是否是未激活的账号
            DataView dv           = Epoint.MisBizLogic2.DB.ExecuteDataView(strSql);
            Boolean  needActivate = dv.Count > 0;

            if (needActivate)
            {
                //string url = "RG_UserActivation.aspx?UserGuid=" + dv[0]["RowGuid"].ToString();
                AlertAjaxMessage("本帐号未激活,请联系管理员");
                return;
            }
            //判断有没有加密锁,如果有的话,就提示用加密锁登录
            strSql = "select PINCode from RG_User where LoginID='" + account.Value + "' ";
            string PINCode = Epoint.MisBizLogic2.DB.ExecuteToString(strSql);

            if (PINCode.Length > 0)
            {
                //WriteAjaxMessage("alert('您已经有加密锁,请通过加密锁登录!');");
                //WriteAjaxMessage("window.location='epasslogin.aspx';");
                //return;
            }
            //判断当前用户是否已经配置key,如果已配置,则检查当前系统是否启用了key,如果启用了key,再检查是否配置了不运行普通登录
            RegisterUserRow_ID = rgUser.RegisterUserLogin(account.Value, common.authPassword(password.Value));



            if (RegisterUserRow_ID == "")
            {
                #region      登录失败情况下,给用户的提示
                if (Convert.ToInt32(ViewState["LoginErrorTimes"]) != 0)
                {
                    if (Convert.ToInt32(ViewState["ErrorTimes"]) >= Convert.ToInt32(ViewState["LoginErrorTimes"]))
                    {
                        WriteAjaxMessage("alert('您的密码或者验证码已经输错超过了3次,系统将自动关闭!');window.close();");
                        string RowGuid = Guid.NewGuid().ToString();
                        Epoint.MisBizLogic2.Data.MisGuidRow oRow = new Epoint.MisBizLogic2.Data.MisGuidRow("RG_Login", RowGuid);
                        oRow["RGGuid"]         = account.Value;
                        oRow["LoginTime"]      = System.DateTime.Now.ToString();
                        oRow["IsLoginSuccess"] = 0;
                        oRow["Message"]        = "" + account.Value + "的密码或验证码输错了3次,系统自动关闭!";
                        oRow.Insert();
                        return;
                    }
                    else
                    {
                        AlertAjaxMessage("系统不能完成您的登录请求,请检查您的用户名和密码是否匹配!");
                        WriteAjaxMessage("window.location=window.location;");
                    }

                    ViewState["ErrorTimes"] = Convert.ToInt32(ViewState["ErrorTimes"]) + 1;
                    //if (ViewState["LoginNeedVlidate"].ToString() == "1")
                    //    CreatImg();
                    return;
                }
                else
                {
                    AlertAjaxMessage("系统不能完成您的登录请求,请检查您的用户名和密码是否匹配!");
                    WriteAjaxMessage("window.location=window.location;");
                    //if (ViewState["LoginNeedVlidate"].ToString() == "1")
                    //    CreatImg();
                    return;
                }
                #endregion
            }
            else
            {
                //RG_Login(RegisterUserRow_ID, txtUserName.Value);
                RG_Login(account.Value);
            }
        }