Example #1
0
        /// <summary>
        /// 添加终端信息
        /// </summary>
        private void Save()
        {
            HD.UI.FileUpload upload = new HD.UI.FileUpload();
            HD.Model.Terminal terminal = new HD.Model.Terminal();
            HD.Model.Source source = new HD.Model.Source();

            terminal.ClassID = ddlClass.SelectedValue;
            terminal.UpdateModel();
            terminal.Guid = Public.GetGuID;

            //附件上传
            source.TerGuid = terminal.Guid;
            source.CreateTime = DateTime.Now;
            source.SourceUrl = upload.UploadPic();

            

            HD.Data.Terminal bll = new HD.Data.Terminal();
            bll.Add(terminal, source);

            MessageBox.ShowMessage("终端信息添加成功!", "terminaladd.aspx");
        }
Example #2
0
        /// <summary>
        /// 编辑终端信息
        /// </summary>
        private void EditTerminal()
        {
            string terminalGuid = Request.Params["terminalGuid"];
            string terminalId = Request.Params["terminalId"];
            string terPage = Request.Params["terPage"];
            string startTime = Request.Params["startTime"];
            string endTime = Request.Params["endTime"];
            string selectType = Request.Params["selectType"];
            string keyWord = Request.Params["keyWord"];
            HD.UI.FileUpload upload = new HD.UI.FileUpload();
            HD.Model.Terminal terminal = new HD.Model.Terminal();
            HD.Model.Source source = new HD.Model.Source();

            terminal.ClassID = ddlClass.SelectedValue;
            //修改终端信息
            terminal.UpdateModel();
            terminal.Guid = terminalGuid;
            terminal.Id = Convert.ToInt32(terminalId);

            //附件上传
            source.TerGuid = terminalGuid;
            //source.CreateTime = DateTime.Now;
            source.SourceUrl = upload.UploadPic();

            HD.Data.Terminal bll = new HD.Data.Terminal();
            bll.Edit(terminal, source);

            MessageBox.ShowMessage("修改提交成功!", "terminallist.aspx?page=" + terPage + "&StartTime=" + startTime + "&EndTime=" + endTime + "&SelectType=" + selectType + "&Keyword=" + keyWord);
        }