コード例 #1
0
        //修改分组
        public int modifyEmailGroup(Tz888.Model.Email.EmailUserModel emodel)
        {
            string sqlStr = "update EmailGroupTab set Group_Name='" + emodel.Group_Name.Trim() + "' where Group_ID=" + emodel.Group_ID.ToString();
            int    flag   = Tz888.DBUtility.DbHelperSQL.ExecuteSql(sqlStr);

            return(flag);
        }
コード例 #2
0
        //添加分组
        public int addEmailGroup(Tz888.Model.Email.EmailUserModel emodel)
        {
            string sqlStr = "insert EmailGroupTab(Group_Name) values ('" + emodel.Group_Name.Trim() + "')";
            int    flag   = Tz888.DBUtility.DbHelperSQL.ExecuteSql(sqlStr);

            return(flag);
        }
コード例 #3
0
        //修改邮件用户
        public int modifyEmailUser(Tz888.Model.Email.EmailUserModel emodel)
        {
            string sqlStr = "update EmailUserTab set Euser_Name='" + emodel.Euser_Name.Trim() + "',Euser_Group=" + emodel.Euser_Group.ToString().Trim()
                            + ",Euser_Email='" + emodel.Euser_Email.Trim() + "' where Euser_ID=" + emodel.Euser_ID.ToString();
            int flag = Tz888.DBUtility.DbHelperSQL.ExecuteSql(sqlStr);

            return(flag);
        }
コード例 #4
0
        //添加邮件用户
        public int addEmailUser(Tz888.Model.Email.EmailUserModel emodel)
        {
            string sqlStr = "insert EmailUserTab(Euser_Name,Euser_Group,Euser_Email) values ('" + emodel.Euser_Name.Trim()
                            + "'," + emodel.Euser_Group.ToString().Trim() + ",'" + emodel.Euser_Email.Trim() + "')";
            int flag = Tz888.DBUtility.DbHelperSQL.ExecuteSql(sqlStr);

            return(flag);
        }
コード例 #5
0
        //获取一个分组
        public Tz888.Model.Email.EmailUserModel getEmailGroupByID(int groupID)
        {
            Tz888.Model.Email.EmailUserModel emodel = new Tz888.Model.Email.EmailUserModel();
            string  sqlStr = "select * from EmailGroupTab where Group_ID=" + groupID.ToString();
            DataSet ds     = Tz888.DBUtility.DbHelperSQL.Query(sqlStr);

            if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];
                emodel.Group_ID      = groupID;
                emodel.Group_Name    = dr["Group_Name"].ToString().Trim();
                emodel.Group_AddTime = Convert.ToDateTime(dr["Group_AddTime"].ToString().Trim());
            }
            ds.Clear();
            return(emodel);
        }
コード例 #6
0
        //获取某个组的邮件用户
        public Tz888.Model.Email.EmailUserModel getEmailUser(int userID)
        {
            Tz888.Model.Email.EmailUserModel emodel = new Tz888.Model.Email.EmailUserModel();
            string sqlStr = "select * from EmailUserTab left join EmailGroupTab on EmailUserTab.Euser_Group=EmailGroupTab.Group_ID " +
                            " where Euser_ID=" + userID.ToString();
            DataSet ds = Tz888.DBUtility.DbHelperSQL.Query(sqlStr);

            if (ds != null && ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                DataRow dr = ds.Tables[0].Rows[0];
                emodel.Euser_ID      = userID;
                emodel.Euser_Name    = dr["Euser_Name"].ToString().Trim();
                emodel.Euser_Group   = Convert.ToInt32(dr["Euser_Group"].ToString().Trim());
                emodel.Euser_Email   = dr["Euser_Email"].ToString().Trim();
                emodel.Group_Name    = dr["Group_Name"].ToString().Trim();
                emodel.Euser_AddTime = Convert.ToDateTime(dr["Euser_AddTime"].ToString().Trim());
            }
            ds.Clear();
            return(emodel);
        }
コード例 #7
0
ファイル: EmailBLL.cs プロジェクト: 262734254/TopfoManage
 //修改邮件用户
 public int modifyEmailUser(Tz888.Model.Email.EmailUserModel emodel)
 {
     return(dal.modifyEmailUser(emodel));
 }
コード例 #8
0
ファイル: EmailBLL.cs プロジェクト: 262734254/TopfoManage
 //添加邮件用户
 public int addEmailUser(Tz888.Model.Email.EmailUserModel emodel)
 {
     return(dal.addEmailUser(emodel));
 }