Ejemplo n.º 1
0
        private void frmPause_Load(object sender, EventArgs e)
        {
            ClsBLL.IniCombox(comboBox1, "中断原因");
            DataTable Dt = SQLDbHelper.Query("Select Worker,CarNo from Booking Where ID=" + RecordID).Tables[0];

            CarNo     = Dt.Rows[0]["CarNo"].ToString();
            Worker    = Dt.Rows[0]["Worker"].ToString();
            this.Text = CarNo + "中断";
        }
Ejemplo n.º 2
0
        private void frmCarStateBoad_Load(object sender, EventArgs e)
        {
            this.Top         = 0;
            this.Left        = 0;
            this.Width       = Screen.PrimaryScreen.WorkingArea.Width;
            this.Height      = Screen.PrimaryScreen.WorkingArea.Height;
            labDateTime.Text = DateTime.Today.ToString("yyyy年MM月dd日");
            ClsBLL.IniCombox(comboBox1, "中断原因");
            dataGridView1.Rows.Add((dataGridView1.Height - dataGridView1.ColumnHeadersHeight) / dataGridView1.RowTemplate.Height);

            string    sqlstring = "Select Items from SysDictionary where ItemName='SA'";
            DataTable Dt2       = SQLDbHelper.Query(sqlstring).Tables[0];

            cmbReceiver.Items.Add("--全部--");
            foreach (DataRow dr in Dt2.Rows)
            {
                cmbReceiver.Items.Add(dr[0].ToString());
            }
            ShowGrid(string.Empty);
            //dataGridView1.BackgroundColor = Color.PaleTurquoise;
            dataGridView1.ClearSelection();

            int Interval = int.Parse(ClsBLL.GetSet("txtSet5"));

            timer1.Interval = Interval * 1000 * 60;
            timer1.Enabled  = true;

            if (!ClsBLL.IsPower(btnToday.Text))
            {
                btnToday.Enabled = false;
            }
            if (!ClsBLL.IsPower(btnMonth.Text))
            {
                btnMonth.Enabled = false;
            }
            pn0.Left = (dataGridView1.Columns[0].Width - pn0.Width) / 2;
            pn1.Left = (dataGridView1.Columns[1].Width - pn1.Width) / 2 + dataGridView1.Columns[0].Width * 1;
            pn2.Left = (dataGridView1.Columns[2].Width - pn2.Width) / 2 + dataGridView1.Columns[0].Width * 2;
            pn3.Left = (dataGridView1.Columns[3].Width - pn3.Width) / 2 + dataGridView1.Columns[0].Width * 3;
            pn4.Left = (dataGridView1.Columns[4].Width - pn4.Width) / 2 + dataGridView1.Columns[0].Width * 4;
            pn0.Controls.Add(pic0Down);
            pic0Down.Top = pic0Up.Top;

            if (!ClsBLL.IsPower("追加项目"))
            {
                追加项目ToolStripMenuItem.Visible = false;
            }
            if (!ClsBLL.IsPower("返修"))
            {
                返修ToolStripMenuItem.Visible = false;
            }
            if (!ClsBLL.IsPower("修改状态"))
            {
                修改状态ToolStripMenuItem.Visible = false;
            }
        }
Ejemplo n.º 3
0
        private void frmDelayService_Load(object sender, EventArgs e)
        {
            string sqlstring = "Select PlanOutTime,ServiceItem,Worker,ServiceHour,CarNo,StartServiceTime from Booking where ID=" + RecordID;

            try
            {
                DataTable Dt = SQLDbHelper.Query(sqlstring).Tables[0];
                txtPlanOut.Text     = Dt.Rows[0]["PlanOutTime"].ToString();
                txtServiceItem.Text = Dt.Rows[0]["ServiceItem"].ToString();
                txtHours.Text       = Convert.ToString(decimal.Floor(decimal.Parse(Dt.Rows[0]["ServiceHour"].ToString()) * 100));
                this.Text           = Dt.Rows[0]["CarNo"].ToString() + this.Text;
                CarNo  = Dt.Rows[0]["CarNo"].ToString();
                worker = Dt.Rows[0]["Worker"].ToString();
                ClsBLL.IniCombox(comboBox1, "中断原因");
            }
            catch (Exception Err)
            {
                MessageBox.Show(Err.Message);
            }
        }
Ejemplo n.º 4
0
        private void frmCarTop_Load(object sender, EventArgs e)
        {
            ClsBLL.IniCombox(cmbPreSA, "SA");
            string sqlstring = "Select ServiceHour,PreSA From Booking Where ID=" + RecordID;

            try
            {
                DataSet dataSet = SQLDbHelper.Query(sqlstring);
                if (dataSet.Tables[0].Rows.Count > 0)
                {
                    double hours = double.Parse(dataSet.Tables[0].Rows[0][0].ToString());
                    numericUpDown1.Value = DateTime.Now.AddHours(hours).Hour;

                    cmbPreSA.Text = dataSet.Tables[0].Rows[0][1].ToString();
                }
            }
            catch (Exception Err)
            {
                MessageBox.Show(Err.Message);
            }
            textBox1.Focus();
        }
Ejemplo n.º 5
0
        private void frmBookNew_Load(object sender, EventArgs e)
        {
            string sqlstring = string.Empty;

            ClsBLL.IniCombox(cmbCarType, "车型");
            ClsBLL.IniCombox(cmbRemindResult, "提醒失败");
            ClsBLL.IniCombox(cmbPreSA, "SA");

            if (ClsBLL.GetSet("ComeType") == "0")
            {
                checkBox1.Visible = true;
                checkBox2.Visible = true;
            }
            if (IsUpdateParts == false)
            {
                tabControl1.TabPages.RemoveAt(1);
            }
            if (RID == -1) //新增
            {
                dateTimePicker1.Value = DateTime.Parse(CurrentDt.ToString("yyyy-MM-dd"));
                numericUpDown1.Value  = CurrentDt.Hour;
                numericUpDown2.Value  = CurrentDt.Minute;
                if (ServiceType.StartsWith("机电"))
                {
                    chkJD.Checked = true;
                    chkBJ.Checked = false;
                }
                else
                {
                    chkJD.Checked = false;
                    chkBJ.Checked = true;
                }
            }
            else  //修改
            {
                LoadBooking();
            }
        }