예제 #1
0
        public bool GetUpdate(M_Page page)
        {
            string sqlStr = "UPDATE [dbo].[ZL_Page] SET [Proname]=@Proname,[PageTitle] = @PageTitle,[KeyWords] = @KeyWords,[Description] = @Description,[LOGO] = @LOGO,[Domain] = @Domain,[Style] = @Style,[HeadHeight] = @HeadHeight,[HeadColor] = @HeadColor,[CommonModelID] = @CommonModelID,[TableName] = @TableName,[Hits] = @Hits,[InfoID] = @InfoID,[Best] = @Best,[Status] = @Status,[UserID] = @UserID,[UserName] = @UserName,[ParentPageID] = @ParentPageID,[ParentUserID] = @ParentUserID,[PageInfo] = @PageInfo,[TopWords] = @TopWords,[BottonWords] = @BottonWords,[CreateTime] = @CreateTime,[NodeStyle]=@NodeStyle,[HeadBackGround]=@HeadBackGround WHERE [ID] = @ID";

            SqlParameter[] cmdParams = page.GetParameters();
            return(SqlHelper.ExecuteSql(sqlStr, cmdParams));
        }
        protected string GetProName(int num)
        {
            B_Page pll       = new B_Page();
            M_Page pageinfo  = pll.GetSelect(Mid);
            string returntxt = "";

            switch (num)
            {
            case 1:
                returntxt = pageinfo.Proname;
                break;

            case 2:
                returntxt = pageinfo.Proname;
                break;

            case 3:
                returntxt = pageinfo.LOGO;
                break;

            case 4:
                returntxt = pageinfo.PageInfo;
                break;
            }
            return(returntxt);
        }
예제 #3
0
        public int GetInsert(M_Page page)
        {
            string sqlStr = "SET IDENTITY_INSERT [ZL_Page] ON;INSERT INTO [dbo].[ZL_Page] ([ID],[Proname],[PageTitle],[KeyWords],[Description],[LOGO],[Domain],[Style],[HeadHeight],[HeadColor],[CommonModelID],[TableName],[Hits],[InfoID],[Best],[Status],[UserID],[UserName],[ParentPageID],[ParentUserID],[PageInfo],[TopWords],[BottonWords],[CreateTime],[NodeStyle],[HeadBackGround]) VALUES (@ID,@Proname,@PageTitle,@KeyWords,@Description,@LOGO,@Domain,@Style,@HeadHeight,@HeadColor,@CommonModelID,@TableName,@Hits,@InfoID,@Best,@Status,@UserID,@UserName,@ParentPageID,@ParentUserID,@PageInfo,@TopWords,@BottonWords,@CreateTime,@NodeStyle,@HeadBackGround);select @@IDENTITY;SET IDENTITY_INSERT [ZL_Page] OFF;";

            SqlParameter[] cmdParams = page.GetParameters();
            return(SqlHelper.ObjectToInt32(SqlHelper.ExecuteScalar(CommandType.Text, sqlStr, cmdParams)));
        }
예제 #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int    id    = DataConverter.CLng(Request.QueryString["id"]);
            M_Page pinfo = pll.GetSelectByGID(id);

            if (pinfo.ID == 0)
            {
                function.WriteErrMsg("无法读取配置信息");
            }
            if (!IsPostBack)
            {
                this.Label1.Text            = pinfo.UserName + "的配置信息";
                this.UserName.Text          = pinfo.UserName;
                this.PageTitle.Text         = pinfo.PageTitle;
                this.HeadHeight.Text        = pinfo.HeadHeight.ToString();
                this.txtHeadBackGround.Text = pinfo.HeadBackGround;
                this.HeadColor.Text         = pinfo.HeadColor;
                this.KeyWords.Text          = pinfo.KeyWords;
                this.Description.Text       = pinfo.Description;
                this.TopWords.Text          = pinfo.TopWords;
                this.BottonWords.Text       = pinfo.BottonWords;
                pageid_Hid.Value            = pinfo.ID.ToString();
                Call.SetBreadCrumb(Master, "<li>后台管理</li><li>企业黄页</li><li><a href='PageManage.aspx'>黄页管理</a></li><li>黄页信息配置</li>");
            }
        }
예제 #5
0
        /// <summary>
        /// 通过Code获取页面
        /// </summary>
        /// <param name="entity">页面类</param>
        /// <returns>页面</returns>
        public M_Page GetPageByCode(M_Page entity)
        {
            var db     = DbFactory.GetSugarInstance();
            var result = db.Queryable <M_Page>().Where(x => x.SystemId == entity.SystemId && x.Code == entity.Code && x.AccId == entity.AccId && x.Id != entity.Id).SingleAsync();

            result.Wait();
            return(result.Result);
        }
예제 #6
0
        protected void Button5_Click(object sender, EventArgs e)
        {
            int    id    = DataConverter.CLng(Request.Form["pageid"]);
            M_Page pinfo = pll.GetSelect(id);

            pinfo.UserName       = this.UserName.Text;
            pinfo.PageTitle      = this.PageTitle.Text;
            pinfo.HeadHeight     = DataConverter.CLng(this.HeadHeight.Text);
            pinfo.HeadBackGround = this.txtHeadBackGround.Text;
            pinfo.HeadColor      = this.HeadColor.Text;
            pinfo.KeyWords       = this.KeyWords.Text;
            pinfo.Description    = this.Description.Text;
            pinfo.TopWords       = this.TopWords.Text;
            pinfo.BottonWords    = this.BottonWords.Text;
            pll.GetUpdate(pinfo);
            function.WriteSuccessMsg("修改成功!", "PageManage.aspx");
        }
예제 #7
0
        public MagPlot(Form1 owner)
        {
            m_page = owner.pages.m;
            InitializeComponent();
            MagPane = zedGraphControl1.GraphPane;
            MagPane.Title.IsVisible  = false;
            MagPane.XAxis.Title.Text = "time (sec)";
            MagPane.YAxis.Title.Text = "Magnetism (uT)";

            // Save 1200 points.  At 50 ms sample rate, this is one minute
            // The RollingPointPairList is an efficient storage class that always
            // keeps a rolling set of point data without needing to shift any data values
            RollingPointPairList xlist = new RollingPointPairList(2000);
            RollingPointPairList ylist = new RollingPointPairList(2000);
            RollingPointPairList zlist = new RollingPointPairList(2000);

            // Initially, a curve is added with no data points (list is empty)
            // Color is blue, and there will be no symbols
            LineItem curve = MagPane.AddCurve("x axis", xlist, Color.Blue, SymbolType.None);

            curve = MagPane.AddCurve("y axis", ylist, Color.Red, SymbolType.None);
            curve = MagPane.AddCurve("z axis", zlist, Color.Green, SymbolType.None);

            // Sample at 50ms intervals
            timer1.Interval = 500;
            timer1.Enabled  = true;
            timer1.Start();

            // Just manually control the X axis range so it scrolls continuously
            // instead of discrete step-sized jumps
            MagPane.XAxis.Scale.Min       = 0;
            MagPane.XAxis.Scale.Max       = (double)numericUpDown1.Value;
            MagPane.XAxis.Scale.MinorStep = 0.5;
            MagPane.XAxis.Scale.MajorStep = 1;
            MagPane.YAxis.Scale.Max       = M_Page.defaultCalibrationData.fullScale_mag / 2;
            MagPane.YAxis.Scale.Min       = -M_Page.defaultCalibrationData.fullScale_mag / 2;

            // Scale the axes
            zedGraphControl1.AxisChange();

            // Save the beginning time for reference
            tickStart = Environment.TickCount;
        }
예제 #8
0
 public int insert(M_Page model)
 {
     return(Sql.insert(strTableName, model.GetParameters(), BLLCommon.GetParas(model), BLLCommon.GetFields(model)));
 }
예제 #9
0
 public bool UpdateByID(M_Page model)
 {
     return(Sql.UpdateByIDs(strTableName, PK, model.ID.ToString(), BLLCommon.GetFieldAndPara(model), model.GetParameters()));
 }