private void barButtonItem提报工时_ItemClick(object sender, ItemClickEventArgs e) { string cno = "", cname = "", cfrom = "", shift = "", begin_date = "", end_date = "", begin_time = "", end_time = "", begin_apply = "", end_apply = "", dept = "", rest_hours = "", hours = "", normal_hours = "", overtime_hours = "", reason = "", status = "", ng_type = "", s_begin = "", s_end = "", s_rest_hours = "", s_overtime_rest_hours = "", overtime_begin = ""; TempEmpAttQuery.GetInfo(ref cno, ref cname, ref dept, ref cfrom, ref shift, ref begin_date, ref end_date, ref begin_time, ref end_time, ref begin_apply, ref end_apply, ref rest_hours, ref hours, ref normal_hours, ref overtime_hours, ref reason, ref status, ref ng_type, ref s_begin, ref s_end, ref s_rest_hours, ref s_overtime_rest_hours, ref overtime_begin); bool right = TempEmpAttQuery.SubmitRight(); if (right) { if (cno != "") { if (begin_time != "" && end_time != "") { TempEmpAttUpdate Frm = new TempEmpAttUpdate(); Frm.TopLevel = false; Frm.Parent = this; Frm.Show(); Frm.BringToFront(); } else { MessageBox.Show("打卡记录不完整,请异常提报!"); } } else { MessageBox.Show("没有选中要提报的打卡记录!"); } } else { MessageBox.Show("没有权限!"); } }
private void TempEmpAttUpdate_Load(object sender, EventArgs e) { BindShift(); //绑定异常类型 Dictionary <string, string> kvDictonary = new Dictionary <string, string>(); kvDictonary.Add("", ""); kvDictonary.Add("忘打卡", "忘打卡"); kvDictonary.Add("漏报", "漏报"); kvDictonary.Add("多报", "多报"); kvDictonary.Add("未录脸", "未录脸"); kvDictonary.Add("卡机异常", "卡机异常"); kvDictonary.Add("迟到", "迟到"); kvDictonary.Add("早退", "早退"); kvDictonary.Add("其它", "其它"); BindingSource bs = new BindingSource(); bs.DataSource = kvDictonary; comboBoxNGType.DataSource = bs; comboBoxNGType.ValueMember = "Key"; comboBoxNGType.DisplayMember = "Value"; comboBoxNGType.SelectedIndex = 0; string cname = "", cfrom = "", shift = "", begin_time = "", end_time = "", begin_apply = "", end_apply = "", dept = "", rest_hours = "", hours = "", normal_hours = "", overtime_hours = "", reason = "", status = "", ng_type = ""; TempEmpAttQuery.GetInfo(ref cno, ref cname, ref dept, ref cfrom, ref shift, ref begin_date, ref end_date, ref begin_time, ref end_time, ref begin_apply, ref end_apply, ref rest_hours, ref hours, ref normal_hours, ref overtime_hours, ref reason, ref status, ref ng_type, ref s_begin, ref s_end, ref s_rest_hours, ref s_overtime_rest_hours, ref overtime_begin); if (cno != "") { textEditCno.Text = cno; textEditName.Text = cname; textEditDept.Text = dept; textEditFrom.Text = cfrom; comboBoxShift.SelectedIndex = -1; comboBoxShift.SelectedValue = shift; comboBoxNGType.SelectedIndex = -1; comboBoxNGType.SelectedValue = ng_type; dateTimePickerDateBegin.Text = begin_date; dateTimePickerDateEnd.Text = end_date; textEditMachineTime.Text = begin_time + "—" + end_time; if (begin_apply != "") { timeEditBegin.Time = Convert.ToDateTime(begin_apply); } if (end_apply != "") { timeEditEnd.Time = Convert.ToDateTime(end_apply); } textEditRest.Text = rest_hours; textEditRealHours.Text = hours; textEditNormal.Text = normal_hours; textEditOverTime.Text = overtime_hours; textEditReason.Text = reason; textEditStatus.Text = status; } else { textEditCno.Enabled = true; } }