Exemplo n.º 1
0
 private void btnOK_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (txtJobName2.Text.Trim().Length == 0)
         {
             throw new BusinessException("招聘会信息修改", "招聘会名称不能为空");
         }
         Job job = new Job();
         job.cnnJobID         = int.Parse(txtJobName2.Tag.ToString());
         job.cnvcJobName      = txtJobName2.Text;
         job.cnvcJobTheme     = this.ultraCombo1.Value.ToString();//this.ultraComboEditor1.Text;//txtJobTheme.Text;
         job.cndBeginDate     = DateTime.Parse(cmbBegin.Text);
         job.cndEndDate       = DateTime.Parse(cmbEnd.Text);
         job.cndBookBeginDate = DateTime.Parse(cmbBookBeginDate.Text);
         job.cndBookEndDate   = DateTime.Parse(cmbBookEndDate.Text);
         job.cnvcOperName     = this.oper.cnvcOperName;
         job.cndOperDate      = DateTime.Now;
         JobManage jobManage = new JobManage();
         jobManage.ModifyJob(job);
         MessageBox.Show(this, "招聘会信息修改成功!", "招聘会信息修改", MessageBoxButtons.OK, MessageBoxIcon.Information);
         btnQuery_Click(null, null);
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 2
0
        protected void Application_End(object sender, EventArgs e)
        {
            LogHelper.Debug("IIS进程池回收");
            JobManage.Stop();

            //发起请求重启启动iis进程
            //解决应用池回收问题   
            System.Threading.Thread.Sleep(30000);
            try
            {
                string strUrl = string.Format("http://{0}/api/Notice/StartIIS", "222.195.226.73");
                System.Net.HttpWebRequest  _httpWebRequest  = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(strUrl);
                System.Net.HttpWebResponse _httpWebResponse = (System.Net.HttpWebResponse)_httpWebRequest.GetResponse();
                //System.IO.Stream _stream = _httpWebResponse.GetResponseStream();//得到回写的字节流 
                string str = _httpWebResponse.StatusDescription;
                LogHelper.Info(_httpWebResponse.StatusCode.ToString() + ":" + _httpWebResponse.StatusDescription);
                //_stream.Dispose();
                _httpWebResponse.Dispose();

                //LogHelper.Info("IIS进程池重启请求成功");
            }
            catch (Exception exception)
            {
                //LogHelper.Error(exception.Message);
                //LogHelper.Info("IIS进程池重启请求失败");
            }
        }
 private void btnCancel_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (this.ultraGrid1.ActiveRow.Cells["状态"].Value.ToString() != "预留")
         {
             throw new BusinessException("展位预订设置", "此展位不在预留状态,无法取消预留!");
         }
         ShowSeat seat = new ShowSeat();
         seat.cnnJobID = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
         seat.cnvcSeat = this.ultraGrid1.ActiveRow.Cells["展位"].Value.ToString();
         JobManage jobManage = new JobManage();
         jobManage.CancelLeaveSeat(seat);
         BindSeat();
         MessageBox.Show(this, "展位预留成功!", "展位预订设置", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 4
0
        private void btnOK_Click(object sender, System.EventArgs e)
        {
            //缴费
            try
            {
                //if (null == cmbShow.SelectedItem)
                //{
                //    throw new BusinessException("缴费","请选择招聘会");
                //}
                if (txtPrepay.Text.Trim().Length == 0)
                {
                    throw new BusinessException("充值", "请输入金额");
                }
                UltraGridRow row = this.ultraGrid1.ActiveRow;
                if (null == row)
                {
                    throw new BusinessException("充值", "请选择充值的非会员");
                }
                string strMemberName = row.Cells["cnvcMemberName"].Value.ToString();
                //Prepay prepay = new Prepay();
                ////prepay.cnnJobID = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
                //prepay.cnvcPaperNo = row.Cells["cnvcPaperNo"].Value.ToString();//txtPaperNo.Text;
                //prepay.cnnPrepay = int.Parse(txtPrepay.Text);
                //prepay.cnnBalance = prepay.cnnPrepay;
                //prepay.cnvcOperName = this.oper.cnvcOperName;
                //prepay.cndOperDate = DateTime.Now;

                FMember member = new FMember();
                //member.cnvcMemberCardNo = row.Cells["cnvcMemberCardNo"].Value.ToString();
                member.cnvcPaperNo    = row.Cells["cnvcPaperNo"].Value.ToString();
                member.cnnPrepay      = Convert.ToDecimal(txtPrepay.Text);
                member.cnvcMemberName = txtMemberName.Text;
                member.cnvcOperName   = this.oper.cnvcOperName;
                member.cndOperDate    = DateTime.Now;
                member.cnvcSales      = cmbSales.Text;
                //pMember = member;
                JobManage job = new JobManage();
                job.AddPrepay(member);

                PrintedBill pBill = new PrintedBill(member.ToTable());
                pBill.cnvcBillType = ConstApp.Bill_Type_AddPrepay;
                Helper.PrintTicket(pBill);
                //this.ultraPrintDocument1.Print();
                MessageBox.Show(this, "充值成功!", "充值", MessageBoxButtons.OK, MessageBoxIcon.Information);
                txtPrepay.Text     = "";
                txtMemberName.Text = "";
                txtPaperNo.Text    = "";
                btnOK.Enabled      = false;
                //cmbShow.Text = "";
            }
            catch (BusinessException bex)
            {
                MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 5
0
        private void btnSave_Click(object sender, System.EventArgs e)
        {
            try
            {
                for (int i = 0; i < this.panel1.Controls.Count; i++)
                {
                    Control  ctrl = this.panel1.Controls[i];
                    ShowSeat seat = new ShowSeat();
                    seat.cnnJobID    = int.Parse(cmbShow.Value.ToString());
                    seat.cnvcJobName = cmbShow.Text.ToString();
                    seat.cnnX        = ctrl.Location.X;
                    seat.cnnY        = ctrl.Location.Y;
                    seat.cnnHeight   = ctrl.Height;
                    seat.cnnWidth    = ctrl.Width;
                    if (ctrl.Name.StartsWith("lbl"))
                    {
                        //朝向
                        zhhLabel zhhlbl = this.panel1.Controls[i] as zhhLabel;
                        if (zhhlbl.BorderTop == System.Drawing.Color.Transparent)
                        {
                            seat.cnvcDirection = "上";
                        }
                        if (zhhlbl.BorderBottom == System.Drawing.Color.Transparent)
                        {
                            seat.cnvcDirection = "下";
                        }
                        if (zhhlbl.BorderLeft == System.Drawing.Color.Transparent)
                        {
                            seat.cnvcDirection = "左";
                        }
                        if (zhhlbl.BorderRight == System.Drawing.Color.Transparent)
                        {
                            seat.cnvcDirection = "右";
                        }
                        //座位号
                        seat.cnvcSeat = ctrl.Name.Substring(3);
                    }
                    seat.cnvcControlName = ctrl.Name;
                    seat.cnvcFloor       = "3";
//					if (cmbShow.Text.StartsWith("默认招聘会展位"))
//					{
//						seat.cnvcDefaultSeat = "1";
//					}
                    JobManage jobManage = new JobManage();
                    jobManage.AddSeat(seat);
                }
                MessageBox.Show(this, "招聘会展位方案设置成功!", "招聘会展位方案设置", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (BusinessException bex)
            {
                MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 6
0
        protected void Application_Start()
        {
            AreaRegistration.RegisterAllAreas();
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);

            BundleConfig.RegisterBundles(BundleTable.Bundles);
            //执行的任务
            JobManage.StartScheduleFromConfigAsync();
        }
        private void BindSeat()
        {
            Job job = new Job();

            job.cnnJobID = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
            JobManage jobManage = new JobManage();
            DataTable dtSeat    = jobManage.GetAllSeat(job);

            this.ultraGrid1.DataSource = dtSeat;
            this.ultraGrid1.DataBind();
        }
Exemplo n.º 8
0
 /// <summary>
 /// 添加或编辑
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public static JobInfo Create(JobInfo model)
 {
     if (model.Id == 0)
     {
         int id = JobManage.Insert(model);
         model.Id = id;
     }
     else
     {
         JobManage.Update(model);
     }
     return(model);
 }
        private void ShowBookSetting_Load(object sender, System.EventArgs e)
        {
            JobManage jobManage = new JobManage();
            DataTable dtJob     = jobManage.GetAllJob();

            cmbShow.DataSource    = dtJob;
            cmbShow.ValueMember   = "cnnID";
            cmbShow.DisplayMember = "cnvcJobName";
            cmbShow.DataBind();
            cmbShow.SelectedIndex = 0;

            BindSeat();
        }
Exemplo n.º 10
0
 public static JobInfo Update(JobInfo model)
 {
     if (model.Id > 0)
     {
         //UPDATE
         JobManage.Update(model);
     }
     else
     {
         int id = JobManage.Add(model);
         model.Id = id;
     }
     return(model);
 }
Exemplo n.º 11
0
        private void btnHold_Click(object sender, System.EventArgs e)
        {
            //占位
            try
            {
                if (txtSeat.Text == "")
                {
                    throw new BusinessException("展位预留", "请选择展位");
                }
                if (txtSeat.Tag == null || txtSeat.Tag.ToString() == "")
                {
                    throw new BusinessException("展位预留", "请选择展位");
                }
                if (null == cmbShow.SelectedItem)
                {
                    throw new BusinessException("展位预留", "请选择招聘会");
                }
                if (null == cmbFloor.SelectedItem)
                {
                    throw new BusinessException("展位预留", "请选择展位大厅");
                }

                ShowSeat seat = new ShowSeat();
                seat.cnvcSeat     = txtSeat.Text;
                seat.cnnJobID     = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
                seat.cnvcFloor    = cmbFloor.SelectedItem.DataValue.ToString();
                seat.cnvcOperName = this.oper.cnvcOperName;
                seat.cndOperDate  = DateTime.Now;

                DataTable dtSeat = Helper.Query("select * from tbShowSeat where cnnJobID=" + seat.cnnJobID + " and cnvcState='" + seat.cnvcOperName + "'");
                if (dtSeat.Rows.Count > 0)
                {
                    ShowSeat oldSeat = new ShowSeat(dtSeat);
                    throw new BusinessException("展位预留", "你已经占了一个位置,不能再占了。你占的位置是:" + oldSeat.cnvcSeat);
                }
                JobManage jm = new JobManage();
                jm.HoldSeat(seat);
                MessageBox.Show(this, "占位成功", "展位预留", MessageBoxButtons.OK, MessageBoxIcon.Information);
                //LoadPanel();
                this.btnLoadSeat_Click(null, null);
            }
            catch (BusinessException bex)
            {
                MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Exemplo n.º 12
0
 private void btnOK_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (txtJobName.Text.Trim().Length == 0)
         {
             throw new BusinessException("招聘会新设", "请输入招聘会名称!");
         }
         DataTable dtJob = Helper.Query("select * from tbJob where cnvcJobName ='" + txtJobName.Text + "'");
         if (dtJob.Rows.Count > 0)
         {
             throw new BusinessException("招聘会新设", "同名招聘会已存在!");
         }
         Job job = new Job();
         job.cnvcJobName      = txtJobName.Text;
         job.cnvcJobTheme     = this.ultraCombo1.Value.ToString();//this.ultraComboEditor1.Text;//txtJobTheme.Text;
         job.cndBeginDate     = DateTime.Parse(cmbBegin.Text);
         job.cndEndDate       = DateTime.Parse(cmbEnd.Text);
         job.cndBookBeginDate = DateTime.Parse(cmbBookBeginDate.Text);
         job.cndBookEndDate   = DateTime.Parse(cmbBookEndDate.Text);
         job.cnvcOperName     = this.oper.cnvcOperName;
         job.cndOperDate      = DateTime.Now;
         if (job.cndEndDate < job.cndBeginDate)
         {
             throw new BusinessException("招聘会新设", "招聘会开始时间不能大于结束时间!");
         }
         if (job.cndBookEndDate < job.cndBookBeginDate)
         {
             throw new BusinessException("招聘会新设", "招聘会预订开始时间不能大于预订结束时间!");
         }
         if (job.cndEndDate < job.cndBookEndDate)
         {
             throw new BusinessException("招聘会新设", "招聘会预订开始时间不能大于招聘会结束时间!");
         }
         JobManage jobManage = new JobManage();
         jobManage.AddJob(job);
         MessageBox.Show(this, "添加招聘会成功!", "招聘会新设", MessageBoxButtons.OK, MessageBoxIcon.Information);
         txtJobName.Text = "";
         //txtJobTheme.Text = "";
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 13
0
        private void ultraButton1_Click(object sender, System.EventArgs e)
        {
            //签到
            try
            {
                Member member = new Member(ms.ToTable());

                JobManage jobManage = new JobManage();
                //预订指定展位
                ms.cnvcState = ConstApp.Show_Seat_State_Booking;
                jobManage.MemberSeatBooking(ms);

                TouchPrintedBill pBill = new TouchPrintedBill(ms.ToTable());
                pBill.cnvcBillType = ConstApp.Bill_Type_SignIn;
                pBill.cnvcShow     = ms.cnvcShowName;
                //pBill.cndEndDate = Form1.pMember.cndEndDate;


                PrintedBill bill      = new PrintedBill(pBill.ToTable());
                Bill        nbill     = null;
                Member      retMember = jobManage.MemberSeatSignIn(ms, bill, out nbill);
                pBill.cnnBalance     = nbill.cnnBalance;
                pBill.cnnLastBalance = nbill.cnnLastBalance;
                pBill.cnnPrepay      = nbill.cnnPrepay;
                //pBill.cnvcFreeLast = retMember.cnvcFree;
                pBill.cnvcSeat = retMember.cnvcSales;

                Helper.PrintTouchTicket(pBill);
                this.lblPrintTip.Visible  = true;
                this.ultraButton1.Visible = false;
                this.ultraButton3.Visible = false;
                this.lblPrintTip.Text     = "签到成功,请在刷卡器下面取签到小票,再到四号窗口领取参会资料!";
                this.timer1.Interval      = 1000;
                this.timer1.Start();
            }
            catch (BusinessException bex)
            {
                DispError(bex.Type + ":" + bex.Message);
                //MessageBox.Show(this, bex.Message, bex.Type,MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
            catch (System.Exception ex)
            {
                DispError("信息提示:" + ex.Message);
                //MessageBox.Show(this,ex.Message,"系统错误",MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
Exemplo n.º 14
0
        private void ShowPlan2Floor_Load(object sender, System.EventArgs e)
        {
            DataTable dtDirection = new DataTable();

            dtDirection.Columns.Add("朝向");
            DataRow drDirection1 = dtDirection.NewRow();

            drDirection1["朝向"] = "上";
            dtDirection.Rows.Add(drDirection1);

            DataRow drDirection2 = dtDirection.NewRow();

            drDirection2["朝向"] = "下";
            dtDirection.Rows.Add(drDirection2);

            DataRow drDirection3 = dtDirection.NewRow();

            drDirection3["朝向"] = "左";
            dtDirection.Rows.Add(drDirection3);

            DataRow drDirection4 = dtDirection.NewRow();

            drDirection4["朝向"] = "右";
            dtDirection.Rows.Add(drDirection4);

            //this.cmbDirection.DropDownStyle = UltraComboStyle.DropDown;

            cmbDirection.DataSource    = dtDirection;
            cmbDirection.ValueMember   = "朝向";
            cmbDirection.DisplayMember = "朝向";
            cmbDirection.DataBind();
            cmbDirection.SelectedIndex = 0;

            JobManage jobManage = new JobManage();
            DataTable dtJob     = jobManage.GetAllJob();

            cmbShow.DataSource    = dtJob;
            cmbShow.ValueMember   = "cnnID";
            cmbShow.DisplayMember = "cnvcJobName";
            cmbShow.DataBind();
            //cmbShow.SelectedIndex = 0;

            this.panel1.Controls.Clear();
        }
Exemplo n.º 15
0
 private void btnRemain_Click(object sender, System.EventArgs e)
 {
     try
     {
         if (txtSeat.Text == "")
         {
             throw new BusinessException("展位预留", "请选择展位");
         }
         if (txtSeat.Tag == null || txtSeat.Tag.ToString() == "")
         {
             throw new BusinessException("展位预留", "请选择展位");
         }
         if (null == cmbShow.SelectedItem)
         {
             throw new BusinessException("展位预留", "请选择招聘会");
         }
         if (null == cmbFloor.SelectedItem)
         {
             throw new BusinessException("展位预留", "请选择展位大厅");
         }
         ShowSeat seat = new ShowSeat();
         seat.cnnJobID     = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
         seat.cnvcJobName  = cmbShow.SelectedItem.DisplayText;
         seat.cnvcSeat     = txtSeat.Text;
         seat.cnvcFloor    = cmbFloor.SelectedItem.DataValue.ToString();
         seat.cnvcState    = ConstApp.Show_Seat_State_Remain;
         seat.cnvcOperName = this.oper.cnvcOperName;
         seat.cndOperDate  = DateTime.Now;
         JobManage jobManage = new JobManage();
         jobManage.SeatRemain(seat);
         MessageBox.Show(this, "展位预留成功!", "展位预留", MessageBoxButtons.OK, MessageBoxIcon.Information);
         LoadPanel();
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 16
0
 private void btnOK_Click(object sender, System.EventArgs e)
 {
     try
     {
         Job job = new Job();
         job.cnnJobID = int.Parse(cmbShow.SelectedItem.DataValue.ToString());
         //job.cnvcJobCycleEnd = txtEndDate.Text;
         JobManage jobManage = new JobManage();
         jobManage.EndJob(job);
         MessageBox.Show(this, "招聘会结束成功!", "招聘会结束", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 17
0
 private void JobEnd_Load(object sender, System.EventArgs e)
 {
     try
     {
         JobManage jobManage = new JobManage();
         DataTable dtJob     = jobManage.GetAllJob();
         cmbShow.DataSource    = dtJob;
         cmbShow.ValueMember   = "cnnID";
         cmbShow.DisplayMember = "cnvcJobName";
         cmbShow.DataBind();
         cmbShow.SelectedIndex = 0;
     }
     catch (BusinessException bex)
     {
         MessageBox.Show(this, bex.Message, bex.Type, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
     catch (System.Exception ex)
     {
         MessageBox.Show(this, ex.Message, "系统错误", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Exemplo n.º 18
0
        protected void Application_Start()
        {
            var configuration = GlobalConfiguration.Configuration;
            var inject        = new InjectConfiguration();

            inject.Configuration(configuration);

            AreaRegistration.RegisterAllAreas();
            GlobalConfiguration.Configure(WebApiConfig.Register);
            FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
            RouteConfig.RegisterRoutes(RouteTable.Routes);
            BundleConfig.RegisterBundles(BundleTable.Bundles);
            AutoMapperConfiguration.Configuration();

            //log4net
            log4net.Config.XmlConfigurator.Configure();

            //定时任务
            JobManage.Start();

            LogHelper.Debug("IIS进程池启动");
        }
Exemplo n.º 19
0
        public void Configuration(IAppBuilder app)
        {
            //Hangfire配置
            var doptions = new DashboardOptions
            {
                AuthorizationFilters = new[] {
                    new DontUseThisAuthorizationFilter()
                }
            };

            //Redis数据库配置
            RedisStorageOptions options = new RedisStorageOptions();

            options.Db     = 14;
            options.Prefix = "Hangfire_";//前缀
            RedisStorage storage = new RedisStorage(RedisConfiger.WriteServerList, options);

            //Hangfire注册
            app.UseHangfireDashboard("/hangfire", doptions, storage);
            JobStorage.Current = storage;
            app.UseHangfireServer();
            JobManage.RegisterJob();
        }
Exemplo n.º 20
0
 //当网站关闭时结束正在执行的工作
 protected void Application_End(object sender, EventArgs e)
 {
     //   在应用程序关闭时运行的代码
     JobManage.ShutDown();
 }
Exemplo n.º 21
0
 public static IPageOfList <JobInfo> List(SearchSetting settings)
 {
     return(JobManage.List(settings));
 }
Exemplo n.º 22
0
 public static JobInfo Get(int id)
 {
     return(JobManage.Get(id));
 }
Exemplo n.º 23
0
        private void LoadSeat(string strID)
        {
            JobManage jobManage = new JobManage();
            DataTable dtSeat    = jobManage.GetAll2DefaultSeat(strID);

            foreach (DataRow drSeat in dtSeat.Rows)
            {
                ShowSeat seat = new ShowSeat(drSeat);
                if (seat.cnvcControlName.StartsWith("lbl"))
                {
                    zhhLabel lbl = new zhhLabel();
                    lbl.Name = seat.cnvcControlName;
                    lbl.Text = seat.cnvcSeat;
                    Point p1 = new Point(seat.cnnX, seat.cnnY);
                    lbl.Location  = p1;
                    lbl.Height    = seat.cnnHeight;
                    lbl.Width     = seat.cnnWidth;
                    lbl.Font      = new System.Drawing.Font("SimSun", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((System.Byte)(134)));
                    lbl.TextAlign = ContentAlignment.MiddleCenter;

                    lbl.BorderStyle = BorderStyle.None;

                    switch (seat.cnvcDirection)
                    {
                    case "上":
                        lbl.BorderBottom = System.Drawing.Color.Black;
                        lbl.BorderLeft   = System.Drawing.Color.Black;
                        lbl.BorderRight  = System.Drawing.Color.Black;
                        lbl.BorderTop    = System.Drawing.Color.Transparent;
                        break;

                    case "下":
                        lbl.BorderBottom = System.Drawing.Color.Transparent;
                        lbl.BorderLeft   = System.Drawing.Color.Black;
                        lbl.BorderRight  = System.Drawing.Color.Black;
                        lbl.BorderTop    = System.Drawing.Color.Black;
                        break;

                    case "左":
                        lbl.BorderBottom = System.Drawing.Color.Black;
                        lbl.BorderLeft   = System.Drawing.Color.Transparent;
                        lbl.BorderRight  = System.Drawing.Color.Black;
                        lbl.BorderTop    = System.Drawing.Color.Black;
                        break;

                    case "右":
                        lbl.BorderBottom = System.Drawing.Color.Black;
                        lbl.BorderLeft   = System.Drawing.Color.Black;
                        lbl.BorderRight  = System.Drawing.Color.Transparent;
                        lbl.BorderTop    = System.Drawing.Color.Black;
                        break;

                    default:
                        lbl.BorderBottom = System.Drawing.Color.Black;
                        lbl.BorderLeft   = System.Drawing.Color.Black;
                        lbl.BorderRight  = System.Drawing.Color.Black;
                        lbl.BorderTop    = System.Drawing.Color.Transparent;
                        break;
                    }


                    lbl.AllowDrop = true;

                    this.panel1.Controls.Add(lbl);
                }
                else
                {
                    Label lbl2 = new Label();
                    lbl2.Name        = seat.cnvcControlName;
                    lbl2.BorderStyle = BorderStyle.FixedSingle;
                    if (seat.cnvcControlName == "dlblEntry")
                    {
                        lbl2.Text = "入口|服务台";
                    }
                    if (seat.cnvcControlName == "dlblPrint")
                    {
                        lbl2.Text = "文印室|电子显示屏";
                    }
                    if (seat.cnvcControlName == "dlblSpace1")
                    {
                    }
                    if (seat.cnvcControlName == "dlblSpace2")
                    {
                    }
                    if (seat.cnvcControlName == "dlblStair")
                    {
                        lbl2.Text = "信息处理室|楼梯间";
                    }
                    if (seat.cnvcControlName == "dlblToilet")
                    {
                        lbl2.Text = "卫生间";
                    }
                    if (seat.cnvcControlName == "label1")
                    {
                        lbl2.Text = "洗手间";
                    }
                    if (seat.cnvcControlName == "label2")
                    {
                        lbl2.Text = "出口";
                    }
                    if (seat.cnvcControlName == "label13")
                    {
                        lbl2.BackColor = Color.Black;
                    }
                    if (seat.cnvcControlName == "label14")
                    {
                        lbl2.BackColor = Color.Black;
                    }
                    if (seat.cnvcControlName == "label15")
                    {
                        lbl2.BackColor = Color.Black;
                    }
                    if (seat.cnvcControlName == "label16")
                    {
                        lbl2.BackColor = Color.Black;
                    }
                    if (seat.cnvcControlName == "label17")
                    {
                        lbl2.BackColor = Color.Black;
                    }
                    Point p2 = new Point(seat.cnnX, seat.cnnY);
                    lbl2.Location = p2;
                    //						lbl2.Left = seat.cnnX;
                    //						lbl2.Top = seat.cnnY;
                    lbl2.Height = seat.cnnHeight;
                    lbl2.Width  = seat.cnnWidth;
                    this.panel1.Controls.Add(lbl2);
                }
            }

            initProperty();
        }
Exemplo n.º 24
0
 /// <summary>
 /// 设置发布
 /// </summary>
 /// <param name="id"></param>
 /// <param name="flag">true:发布,false:不发布</param>
 /// <returns></returns>
 public static int SetPublish(int id, bool flag)
 {
     return(JobManage.SetPublish(id, flag));
 }
Exemplo n.º 25
0
 /// <summary>
 /// 删除
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public static int Delete(int id)
 {
     return(JobManage.Delete(id));
 }