Пример #1
0
 public ttCongPhu(string _id_rowindex, qlCongPhu _ql)
 {
     InitializeComponent();
     SetDefault();
     ql = _ql;
     if (!string.IsNullOrEmpty(_id_rowindex))
     {
         idCongPhu = _id_rowindex.Split('_').GetValue(0).ToString();
         rowindex = _id_rowindex.Split('_').GetValue(1).ToString();
         btThem.Text = "Cập nhật";
         DataTable dt = DA.Load_CongCatPhu(new string[] { idCongPhu });
         dtpNgayCong.Value = DateTime.ParseExact(dt.Rows[0][1].ToString(), "MM/dd/yyyy", CultureInfo.InvariantCulture); ;
         cbCongNhan.SelectedValue = dt.Rows[0][2].ToString();
         cbTenViec.SelectedValue = dt.Rows[0][3].ToString();
         txtGioCong.Text = dt.Rows[0][4].ToString();
         txtGiaCong.Text = dt.Rows[0][5].ToString();
     }
 }
Пример #2
0
 private void btCongPhu_Click(object sender, EventArgs e)
 {
     ActiveForm.Hide();
     var ql = new qlCongPhu();
     ql.Show();
 }