예제 #1
0
 private void txtPerson_TextChanged(object sender, EventArgs e)
 {
     try
     {
         DateTime day = CommonUntil.mustFinish(dateStart.Value.Date, dateEnd.Value.Date, this.plan_person, txtPerson.Text);
         dateMustFinish.Value = day;
     } catch
     {
         //
     }
 }
예제 #2
0
        private void dataGridView1_CellValueChanged(object sender, DataGridViewCellEventArgs e)
        {
            try
            {
                int      person      = Int32.Parse(dataGridView1.Rows[e.RowIndex].Cells["person"].Value.ToString());
                DateTime dateStart   = DateTime.ParseExact(dataGridView1.Rows[e.RowIndex].Cells["re_plan_date_start"].Value.ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
                DateTime dateEnd     = DateTime.ParseExact(dataGridView1.Rows[e.RowIndex].Cells["re_plan_date_end"].Value.ToString(), "dd-MM-yyyy", CultureInfo.InvariantCulture);
                object   plan_person = dataGridView1.Rows[e.RowIndex].Cells["plan_person"].Value;

                DateTime day = CommonUntil.mustFinish(dateStart, dateEnd, plan_person, person);
                dataGridView1.Rows[e.RowIndex].Cells["must_date_finish"].Value = day.ToString("dd-MM-yyyy");;
            } catch
            {
                //
            }
        }
예제 #3
0
        public void ThreadTask()
        {
            while (!stop)
            {
                try
                {
                    ThreadEventReadToSend.WaitOne(Timeout.Infinite);
                    if (mainWindow.ShowRecing)
                    {
                        continue;
                    }
                    MstAuditUserEntity authorInfo;
                    int ret = ReadRecoResult(out authorInfo);

                    if (ret > 0)
                    {
                        //Show Image data
                        mainWindow.ShowRecoImg(true, CommonUntil.GetByteFromBitmap(authorInfo.ImageBitmap), authorInfo.Username, authorInfo.Title, "认证成功");
                        mainWindow.ShowLable2("认证成功.");
                        //mainWindow.Door.OpenDoor();
                    }
                    else if (ret == -1)
                    {
                        mainWindow.ShowRecoImg(false, null, "", "", "认证失败");
                        mainWindow.ShowLable2("认证失败.");
                    }

                    else//无数据或数据已失效
                    {
                        mainWindow.ShowLable2("无有效数据.");
                    }
                }
                catch (Exception ex)
                {
                    mainWindow.ShowLable2("读取识别异常!", false);
                }
                finally
                {
                    isbusy = false;
                }
            }
        }