Exemple #1
0
    protected void init()
    {
        try
        {
            string       id = Request.QueryString["ServiceID"].ToString();
            VServiceInfo n  = Leyp.SQLServerDAL.Factory.getServiceInfoDAL().getByID(int.Parse(id));
            if (n == null)
            {
                Response.Write("没有数据!");
                Response.End();
                return;
            }



            IDS.Text          = id;
            ServiceTitle.Text = n.ServiceTitle;
            CreateDate.Text   = n.CreateDate;
            Content.Text      = n.Content;
            ServiceName.Text  = n.ServiceName;
            ReplyInfo.Text    = n.ReplyInfo;
            AuditingUser.Text = n.AuditingUser;
            UserName.Text     = n.UserName;
            State.Text        = changString(n.State.ToString());
            RealName.Text     = n.RealName;
        }
        catch
        {
            Response.Write("参数有误!");
        }
    }
Exemple #2
0
        public VServiceInfo getByID(int ID)
        {
            bool flag = false;

            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@ID", SqlDbType.Int, 4) };
            parameters[0].Value = ID;
            VServiceInfo  info   = new VServiceInfo();
            SqlDataReader reader = SQLHelper.RunProcedure("p_ServiceInfo_getByID", parameters);

            if (reader.Read())
            {
                info.TypeID       = reader.GetInt32(reader.GetOrdinal("TypeID"));
                info.ID           = reader.GetInt32(reader.GetOrdinal("ID"));
                info.State        = reader.GetInt32(reader.GetOrdinal("State"));
                info.AuditingUser = reader.GetString(reader.GetOrdinal("AuditingUser"));
                info.ServiceTitle = reader.GetString(reader.GetOrdinal("ServiceTitle"));
                info.CreateDate   = reader.GetString(reader.GetOrdinal("CreateDate"));
                info.ServiceName  = reader.GetString(reader.GetOrdinal("ServiceName"));
                info.UserName     = reader.GetString(reader.GetOrdinal("UserName"));
                info.RealName     = reader.GetString(reader.GetOrdinal("RealName"));
                info.Content      = reader.GetString(reader.GetOrdinal("Content"));
                info.ReplyInfo    = reader.GetString(reader.GetOrdinal("ReplyInfo"));
                flag = true;
            }
            reader.Close();
            return(flag ? info : null);
        }
Exemple #3
0
        public List <VServiceInfo> getSearchListByDate(string beginDate, string endDate, int sideState)
        {
            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@beginDate", SqlDbType.NVarChar), new SqlParameter("@endDate", SqlDbType.NVarChar), new SqlParameter("@sideState", SqlDbType.Int) };
            parameters[0].Value = beginDate;
            parameters[1].Value = endDate;
            parameters[2].Value = sideState;
            List <VServiceInfo> list   = new List <VServiceInfo>();
            SqlDataReader       reader = SQLHelper.RunProcedure("p_ServiceInfo_getSearchListByDate", parameters);

            while (reader.Read())
            {
                VServiceInfo item = new VServiceInfo();
                item.TypeID       = reader.GetInt32(reader.GetOrdinal("TypeID"));
                item.ID           = reader.GetInt32(reader.GetOrdinal("ID"));
                item.AuditingUser = reader.GetString(reader.GetOrdinal("AuditingUser"));
                item.ServiceTitle = reader.GetString(reader.GetOrdinal("ServiceTitle"));
                item.CreateDate   = reader.GetString(reader.GetOrdinal("CreateDate"));
                item.ServiceName  = reader.GetString(reader.GetOrdinal("ServiceName"));
                item.UserName     = reader.GetString(reader.GetOrdinal("UserName"));
                item.RealName     = reader.GetString(reader.GetOrdinal("RealName"));
                item.State        = reader.GetInt32(reader.GetOrdinal("State"));
                list.Add(item);
            }
            reader.Close();
            return(list);
        }
Exemple #4
0
    protected void init()
    {
        List <Notice> list0 = new List <Notice>();
        List <Notice> list1 = new List <Notice>();
        List <Notice> list2 = new List <Notice>();


        Leyp.SQLServerDAL.NoticeDAL dl = Leyp.SQLServerDAL.Factory.getNoticeDAL();

        List <VServiceInfo> list3  = null;
        List <VServiceInfo> list30 = new List <VServiceInfo>();

        list3 = Leyp.SQLServerDAL.Factory.getServiceInfoDAL().getMyTopic(getUserName());
        for (int i = 0; i < list3.Count; i++)
        {
            VServiceInfo s = list3[i];
            list30.Add(s);
            if (i == 4)
            {
                break;
            }
        }

        list0 = dl.getNewsByType(0); //通知
        list1 = dl.getNewsByType(1); //热销活动
        list2 = dl.getNewsByType(2); //会议

        Noticelist.DataSource = list0;
        Noticelist.DataBind();

        NewsSales.DataSource = list1;
        NewsSales.DataBind();

        MeetingRepeater.DataSource = list2;
        MeetingRepeater.DataBind();

        VServiceInfoList.DataSource = list30;
        VServiceInfoList.DataBind();
    }
Exemple #5
0
        public List <VServiceInfo> getAll()
        {
            List <VServiceInfo> list   = new List <VServiceInfo>();
            SqlDataReader       reader = SQLHelper.RunProcedure("p_ServiceInfo_getAll", null);

            while (reader.Read())
            {
                VServiceInfo item = new VServiceInfo();
                item.TypeID       = reader.GetInt32(reader.GetOrdinal("TypeID"));
                item.ID           = reader.GetInt32(reader.GetOrdinal("ID"));
                item.AuditingUser = reader.GetString(reader.GetOrdinal("AuditingUser"));
                item.ServiceTitle = reader.GetString(reader.GetOrdinal("ServiceTitle"));
                item.CreateDate   = reader.GetString(reader.GetOrdinal("CreateDate"));
                item.ServiceName  = reader.GetString(reader.GetOrdinal("ServiceName"));
                item.UserName     = reader.GetString(reader.GetOrdinal("UserName"));
                item.RealName     = reader.GetString(reader.GetOrdinal("RealName"));
                item.State        = reader.GetInt32(reader.GetOrdinal("State"));
                list.Add(item);
            }
            reader.Close();
            return(list);
        }
Exemple #6
0
        public List <VServiceInfo> getMyAuditingUserTopic(string UserName)
        {
            SqlParameter[] parameters = new SqlParameter[] { new SqlParameter("@UserName", SqlDbType.NVarChar) };
            parameters[0].Value = UserName;
            List <VServiceInfo> list   = new List <VServiceInfo>();
            SqlDataReader       reader = SQLHelper.RunProcedure("p_ServiceInfo_getMyAuditingUserTopic", parameters);

            while (reader.Read())
            {
                VServiceInfo item = new VServiceInfo();
                item.TypeID       = reader.GetInt32(reader.GetOrdinal("TypeID"));
                item.ID           = reader.GetInt32(reader.GetOrdinal("ID"));
                item.AuditingUser = reader.GetString(reader.GetOrdinal("AuditingUser"));
                item.ServiceTitle = reader.GetString(reader.GetOrdinal("ServiceTitle"));
                item.CreateDate   = reader.GetString(reader.GetOrdinal("CreateDate"));
                item.ServiceName  = reader.GetString(reader.GetOrdinal("ServiceName"));
                item.UserName     = reader.GetString(reader.GetOrdinal("UserName"));
                item.RealName     = reader.GetString(reader.GetOrdinal("RealName"));
                item.State        = reader.GetInt32(reader.GetOrdinal("State"));
                list.Add(item);
            }
            reader.Close();
            return(list);
        }