コード例 #1
0
ファイル: frmBooking.cs プロジェクト: liquanchun/PORSCHE
 private void button2_Click(object sender, EventArgs e)
 {
     if (!ClsBLL.CheckFormIsOpen("frmCarStateBoad"))
     {
         frmCarStateBoad fcsb = new frmCarStateBoad();
         fcsb.Show();
     }
     else
     {
         Form frm = Application.OpenForms["frmCarStateBoad"];
         frm.Focus();
     }
 }
コード例 #2
0
ファイル: frmBooking.cs プロジェクト: liquanchun/PORSCHE
 private void button1_Click(object sender, EventArgs e)
 {
     if (!ClsBLL.CheckFormIsOpen("frmWork"))
     {
         frmWork fw = new frmWork();
         fw.Show();
     }
     else
     {
         Form frm = Application.OpenForms["frmWork"];
         frm.Focus();
     }
 }
コード例 #3
0
 private void btnToday_Click(object sender, EventArgs e)
 {
     if (!ClsBLL.CheckFormIsOpen("frmBooking"))
     {
         frmBooking fcsb = new frmBooking();
         fcsb.Show();
     }
     else
     {
         Form frm = Application.OpenForms["frmBooking"];
         frm.Focus();
     }
 }
コード例 #4
0
ファイル: frmBooking.cs プロジェクト: liquanchun/PORSCHE
        //双击新增预约
        private void dataGridView1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex < 1 || e.ColumnIndex == 0)
            {
                return;
            }
            if (!ClsBLL.IsPower("新增预约"))
            {
                MessageBox.Show("你没有权限新增预约!");
                return;
            }
            Colindex = e.ColumnIndex;
            Rowindex = e.RowIndex;
            if (e.RowIndex < 1)
            {
                return;
            }
            DateTime Date1 = DateTime.Parse(labDateTime.Text);
            DateTime Date2;
            string   cellval = dataGridView1.Rows[Rowindex].Cells[0].Value.ToString();

            Date2 = DateTime.Parse(Date1.ToString("yyyy-MM-dd") + " " + cellval);
            if (!ClsBLL.CheckFormIsOpen("frmBookNew"))
            {
                string servicetype = "机电维修";
                if (Colindex == 2)
                {
                    servicetype = "车身维修";
                }
                frmBookNew fm3 = new frmBookNew(Date2, servicetype);
                fm3.AddCarHandle += new frmBookNew.AddCar(AddCarCardNew);
                if (fm3.ShowDialog() == DialogResult.OK)
                {
                    刷新ToolStripMenuItem_Click(null, null);
                }
            }
            else
            {
                Form frm = Application.OpenForms["frmBookNew"];
                frm.Focus();
            }
        }
コード例 #5
0
ファイル: frmMain.cs プロジェクト: gvhung/shenzhen_porsche
 private void button1_Click(object sender, EventArgs e)
 {
     try
     {
         if (!ClsBLL.CheckFormIsOpen("frmBooking"))
         {
             frmBooking fw = new frmBooking();
             fw.Show();
         }
         else
         {
             Form frm = Application.OpenForms["frmBooking"];
             frm.Focus();
         }
     }
     catch (Exception Err)
     {
         MessageBox.Show(Err.Source + "/" + Err.TargetSite.Attributes.ToString() + "/" + Err.Message);
     }
 }
コード例 #6
0
ファイル: frmMain.cs プロジェクト: gvhung/shenzhen_porsche
        private void timer2_Tick(object sender, EventArgs e)
        {
            string sqlstring = "Select * from UpdateMsg where Createdate >'" + LoginTime + "'";

            sqlstring += " And Creator <>'" + ClsBLL.UserName + "' And ID not in(Select MsgID from UserMsg Where UserName='******')";
            try
            {
                DataTable Dt = SQLDbHelper.Query(sqlstring).Tables[0];
                if (Dt.Rows.Count > 0)
                {
                    if (!ClsBLL.CheckFormIsOpen("frmMsg") && this.WindowState != FormWindowState.Minimized)
                    {
                        frmMsg fm = new frmMsg(Dt.Rows[0]["Message"].ToString(), int.Parse(Dt.Rows[0]["BookID"].ToString()), int.Parse(Dt.Rows[0]["ID"].ToString()));
                        fm.Show();
                    }
                }
            }
            catch (Exception Err)
            {
                MessageBox.Show(Err.Message);
                timer2.Enabled = false;
            }
        }