Ejemplo n.º 1
0
 public ttCongIn(string _id_rowindex, qlCongIn _ql)
 {
     InitializeComponent();
     SetDefault();
     ql = _ql;
     if (!string.IsNullOrEmpty(_id_rowindex))
     {
         idN2 = _id_rowindex.Split('_').GetValue(0).ToString();
         rowindex = _id_rowindex.Split('_').GetValue(1).ToString();
         btThem.Text = "Cập nhật";
         DataTable dt = DA.Load_CongIn(new string[] { idN2 });
         dtpNgayCong.Value = DateTime.ParseExact(dt.Rows[0][1].ToString(), "MM/dd/yyyy", CultureInfo.InvariantCulture);
         cbCongviec.SelectedValue = dt.Rows[0][2].ToString();
         txtSoSp.Text = dt.Rows[0][3].ToString();
         cbKhoVai.SelectedValue = dt.Rows[0][4].ToString();
         cbTho1.SelectedValue = dt.Rows[0][5].ToString();
         txtGio1.Text = dt.Rows[0][6].ToString();
         txtGia1.Text = dt.Rows[0][7].ToString();
         cbTho2.SelectedValue = dt.Rows[0][8].ToString();
         txtGio2.Text = dt.Rows[0][9].ToString();
         txtGia2.Text = dt.Rows[0][10].ToString();
         cbTho3.SelectedValue = dt.Rows[0][11].ToString();
         txtGio3.Text = dt.Rows[0][12].ToString();
         txtGia3.Text = dt.Rows[0][13].ToString();
         cbTho4.SelectedValue = dt.Rows[0][14].ToString();
         txtGio4.Text = dt.Rows[0][15].ToString();
         txtGia4.Text = dt.Rows[0][16].ToString();
         txtInHu.Text = dt.Rows[0][17].ToString();
         cbThoinHu.SelectedValue = dt.Rows[0][18].ToString();
         txtInPhe.Text = dt.Rows[0][19].ToString();
         cbThoInPhe.SelectedValue = dt.Rows[0][20].ToString();
         txtInVayMuc.Text = dt.Rows[0][21].ToString();
         cbThoInVayMuc.SelectedValue = dt.Rows[0][22].ToString();
         txtGhichu.Text = dt.Rows[0][23].ToString();
     }
 }
Ejemplo n.º 2
0
 private void bt_qlCongN2_Click(object sender, EventArgs e)
 {
     ActiveForm.Hide();
     var ql = new qlCongIn();
     ql.Show();
 }