示例#1
0
        /// <summary>
        /// 获取列表
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static IEnumerable <E_RECEIVE_Model> getListModel(E_RECEIVE_SW sw)
        {
            DataTable dt     = BaseDT.E_RECEIVE.getDT(sw);//列表
            var       result = new List <E_RECEIVE_Model>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                E_RECEIVE_Model m = new E_RECEIVE_Model();
                m.ERID               = dt.Rows[i]["ERID"].ToString();
                m.BYEMAILID          = dt.Rows[i]["BYEMAILID"].ToString();
                m.RECEIVETYPE        = dt.Rows[i]["RECEIVETYPE"].ToString();
                m.EMAILRECEIVESTATUS = dt.Rows[i]["EMAILRECEIVESTATUS"].ToString();
                m.EMAILSENDTIME      = ClsSwitch.SwitTM(dt.Rows[i]["EMAILSENDTIME"].ToString());
                m.EMAILRECEIVETIME   = ClsSwitch.SwitTM(dt.Rows[i]["EMAILRECEIVETIME"].ToString());
                m.SubjectModel       = E_SUBJECTCls.getModel(new E_SUBJECT_SW {
                    EMAILID = m.BYEMAILID
                });
                m.FileModel = E_FILECls.getListModel(new E_File_SW {
                    BYEMAILID = m.BYEMAILID
                });
                if (m.EMAILRECEIVESTATUS == "0")//未读
                {
                    BaseDT.E_RECEIVE.Mdy(new E_RECEIVE_Model
                    {
                        EMAILRECEIVESTATUS = "1",
                        EMAILRECEIVETIME   = ClsSwitch.SwitTM(DateTime.Now),
                        ERID = m.ERID
                    });
                }
                result.Add(m);
            }
            dt.Clear();
            dt.Dispose();
            return(result);
        }
示例#2
0
        /// <summary>
        /// 查看某一邮件信息
        /// </summary>
        /// <param name="sw"></param>
        /// <returns></returns>
        public static E_RECEIVE_Model getModel(E_RECEIVE_SW sw)
        {
            DataTable       dt = BaseDT.E_RECEIVE.getDT(sw);//列表
            E_RECEIVE_Model m  = new E_RECEIVE_Model();

            if (dt.Rows.Count > 0)
            {
                int i = 0;
                m.ERID               = dt.Rows[i]["ERID"].ToString();
                m.BYEMAILID          = dt.Rows[i]["BYEMAILID"].ToString();
                m.RECEIVETYPE        = dt.Rows[i]["RECEIVETYPE"].ToString();
                m.EMAILRECEIVESTATUS = dt.Rows[i]["EMAILRECEIVESTATUS"].ToString();
                m.EMAILSENDTIME      = ClsSwitch.SwitTM(dt.Rows[i]["EMAILSENDTIME"].ToString());
                m.EMAILRECEIVETIME   = ClsSwitch.SwitTM(dt.Rows[i]["EMAILRECEIVETIME"].ToString());
                m.SubjectModel       = E_SUBJECTCls.getModel(new E_SUBJECT_SW {
                    EMAILID = m.BYEMAILID
                });
                m.FileModel = E_FILECls.getListModel(new E_File_SW {
                    BYEMAILID = m.BYEMAILID
                });
                if (m.EMAILRECEIVESTATUS == "0")//未读
                {
                    BaseDT.E_RECEIVE.Mdy(new E_RECEIVE_Model {
                        EMAILRECEIVESTATUS = "1",
                        EMAILRECEIVETIME   = ClsSwitch.SwitTM(DateTime.Now),
                        ERID = m.ERID
                    });
                }
            }
            dt.Clear();
            dt.Dispose();
            return(m);
        }
示例#3
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="sw"></param>
        /// <param name="total"></param>
        /// <returns></returns>
        public static IEnumerable <E_RECEIVE_Model> getListModel(E_RECEIVE_SW sw, out int total)
        {
            DataTable dt     = BaseDT.E_RECEIVE.getDT(sw, out total);//列表
            var       result = new List <E_RECEIVE_Model>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                E_RECEIVE_Model m = new E_RECEIVE_Model();
                m.ERID               = dt.Rows[i]["ERID"].ToString();
                m.BYEMAILID          = dt.Rows[i]["BYEMAILID"].ToString();
                m.RECEIVETYPE        = dt.Rows[i]["RECEIVETYPE"].ToString();
                m.EMAILRECEIVESTATUS = dt.Rows[i]["EMAILRECEIVESTATUS"].ToString();
                m.EMAILSENDTIME      = ClsSwitch.SwitTM(dt.Rows[i]["EMAILSENDTIME"].ToString());
                m.EMAILRECEIVETIME   = ClsSwitch.SwitTM(dt.Rows[i]["EMAILRECEIVETIME"].ToString());
                m.SubjectModel       = E_SUBJECTCls.getModel(new E_SUBJECT_SW {
                    EMAILID = m.BYEMAILID
                });
                result.Add(m);
            }
            dt.Clear();
            dt.Dispose();
            return(result);
        }