Exemple #1
0
        private void btnNhapVT_Click(object sender, EventArgs e)
        {
            cdha_dvll_Oracle cdhadvl_O = new cdha_dvll_Oracle();


            int stt = 0;

            foreach (DataGridViewRow item in ddsdaduyet.Rows)
            {
                DataGridViewCell oCell = item.Cells["CHON_"];
                bool             check = Convert.ToBoolean(oCell.Value);
                if (check == true && item.Visible == true)
                {
                    cdha_dvll vct  = new cdha_dvll();
                    string    s_id = item.Cells["id_"].Value.ToString();

                    string       s_mavp  = item.Cells["mavp_"].Value.ToString();
                    string       s_tenvp = item.Cells["tenvp_"].Value.ToString();
                    frmnhapvattu frm     = new frmnhapvattu("", s_tenvp, s_id, s_mavp, "0");
                    frm.Show();
                    return;
                }
            }
            f_load_before();
        }
Exemple #2
0
        private void f_duyetthuchien()
        {
            cdha_dvll_Oracle dvll_Oracle = new cdha_dvll_Oracle();

            foreach (DataGridViewRow item in dschuaduyet.Rows)
            {
                DataGridViewCell oCell = item.Cells["Chon"];
                bool             check = Convert.ToBoolean(oCell.Value);
                if (check == true)
                {
                    cdha_dvll dvll = new cdha_dvll();
                    dvll.ID           = long.Parse(item.Cells["id"].Value.ToString());
                    dvll.DONE         = "1";
                    dvll.NGAYTHUCHIEN = dngaybc.Value;
                    dvll.Noithuchien  = cbarea.SelectedValue.ToString();
                    dvll_Oracle.f_update(dvll);
                    string       s_mavp  = item.Cells["mavp"].Value.ToString();
                    string       s_tenvp = item.Cells["tenvp"].Value.ToString();
                    frmnhapvattu frm     = new frmnhapvattu("", s_mavp, dvll.ID.ToString(), s_mavp, "1");
                    frm.Show();
                    string          s_id      = dvll.ID.ToString();
                    cdha_hen_Oracle henOracle = new cdha_hen_Oracle();
                    henOracle.f_update_dathuchien("1", s_id);
                }
            }
        }
Exemple #3
0
        private void ddsdaduyet_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            DataGridViewRow item   = ddsdaduyet.CurrentRow;
            DateTime        ngayth = m_format.DateTime_parse(item.Cells["ngayth2"].Value.ToString());

            if (f_kiemtra_locked(ngayth))
            {
                string       s_mavp  = item.Cells["mavp_"].Value.ToString();
                string       s_id    = item.Cells["id_"].Value.ToString();
                string       s_tenvp = item.Cells["tenvp_"].Value.ToString();
                frmnhapvattu frm     = new frmnhapvattu("", s_tenvp, s_id, s_mavp, "0");
                frm.Show();
            }
        }
Exemple #4
0
        private void save()
        {
            cdha_dvll_Oracle cdhadvl_O = new cdha_dvll_Oracle();


            int stt = 0;

            foreach (DataGridViewRow item in dview.Rows)
            {
                DataGridViewCell oCell = item.Cells["check"];
                bool             check = Convert.ToBoolean(oCell.Value);
                if (check == true && item.Visible == true)
                {
                    cdha_dvll vct = new cdha_dvll();
                    vct.ID = long.Parse(item.Cells["ID"].Value.ToString());


                    vct.MAKP       = item.Cells["MAKP"].Value.ToString();
                    vct.SOHD       = item.Cells["SoHDDV"].Value.ToString();
                    vct.SOBL       = item.Cells["SoBL"].Value.ToString();
                    vct.MADOITUONG = item.Cells["MADOITUONG"].Value.ToString();
                    vct.MAVP       = item.Cells["MAVP"].Value.ToString();
                    vct.SOLUONG    = float.Parse(item.Cells["SL"].Value.ToString());
                    vct.DONGIA     = float.Parse(item.Cells["DONGIA"].Value.ToString());
                    vct.NGAYCD     = DateTime.ParseExact(item.Cells["NGAY"].Value.ToString(), "dd/MM/yyyy", null);
                    vct.MABSCD     = item.Cells["MaBS"].Value.ToString();
                    DateTime temp  = dngaybc.Value;
                    DateTime value = m_format.DateTime_parse_HHmm(String.Format("{0:dd/MM/yyyy} {1:HH:mm}", temp, DateTime.Now));
                    vct.NGAYCHUP    = value;
                    vct.MABN        = item.Cells["Mabn"].Value.ToString();
                    vct.STT         = stt;
                    vct.Noithuchien = cbarea.SelectedValue.ToString();
                    vct.Cdhakhu     = AccessData.s_makhuvuc;


                    cdhadvl_O.f_insert_bv(vct);
                    stt++;
                    string       s_mavp  = item.Cells["mavp"].Value.ToString();
                    string       s_tenvp = item.Cells["tenvp"].Value.ToString();
                    string       s_id    = vct.ID.ToString();
                    frmnhapvattu frm     = new frmnhapvattu("", s_tenvp, s_id, s_mavp, "1");
                    frm.Show();

                    cdha_hen_Oracle henOracle = new cdha_hen_Oracle();
                    henOracle.f_update_dathuchien("1", s_id);
                }
            }
        }
Exemple #5
0
        private void btnSavefilm_Click(object sender, EventArgs e)
        {
            cdha_dvll_Oracle dvll_Oracle = new cdha_dvll_Oracle();

            foreach (DataGridViewRow item in ddsdaduyet.Rows)
            {
                DataGridViewCell oCell = item.Cells["Chon_"];
                bool             check = Convert.ToBoolean(oCell.Value);
                if (check == true)
                {
                    cdha_dvll dvll = new cdha_dvll();
                    dvll.ID = long.Parse(item.Cells["id_"].Value.ToString());

                    string       s_mavp  = item.Cells["mavp_"].Value.ToString();
                    string       s_tenvp = item.Cells["tenvp_"].Value.ToString();
                    frmnhapvattu frm     = new frmnhapvattu("", s_tenvp, dvll.ID.ToString(), s_mavp, "1");
                    frm.Show();
                }
            }
        }