コード例 #1
0
        private void save_trakq()
        {
            cdha_dvll_Oracle cdhadvl_O = new cdha_dvll_Oracle();

            // DataGridViewRow row = dview.SelectedRows[0];
            int stt = 0;

            foreach (DataGridViewRow item in ddsdaduyet.Rows)
            {
                DataGridViewCell oCell = item.Cells["TRAKQ"];
                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.TRAKQ = "1";
                    cdhadvl_O.f_update_trakq(vct);
                }
                else
                {
                    cdha_dvll vct = new cdha_dvll();
                    vct.ID    = long.Parse(item.Cells["id_"].Value.ToString());
                    vct.TRAKQ = "0";
                    cdhadvl_O.f_update_trakq(vct);
                }
            }
            f_load_before();
        }
コード例 #2
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();
        }
コード例 #3
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);
                }
            }
        }
コード例 #4
0
        private void btInTraKQ_Click(object sender, EventArgs e)
        {
            AccessData       d          = new AccessData();
            string           reportname = "rpt_baocaoCDHA_DV_M03.rpt";
            cdha_dvll_Oracle dvll       = new cdha_dvll_Oracle();
            DateTime         tungay     = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay    = m_format.DateTime_parse(haison1.denngay);
            string           title      = haison1.s_title.Replace("Báo cáo ", "").ToUpper();
            DataTable        dt         = dvll.f_getBAOCAO_M02_TRAKQ_khu(tungay, denngay, AccessData.s_makhuvuc);
            frmReport        a          = new frmReport(d, dt, reportname, title, txtHoTen.Text, "Giam đốc", "", "", "", "", "", "", "");

            a.Show();
        }
コード例 #5
0
        private void f_delete_after()
        {
            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)
                {
                    dvll_Oracle.f_delete(long.Parse(item.Cells["id_"].Value.ToString()));
                }
            }
        }
コード例 #6
0
        private void btInTraKQ_Click(object sender, EventArgs e)
        {
            AccessData       d          = new AccessData();
            string           reportname = "rpt_baocaoCDHA_DV_M03.rpt";
            cdha_dvll_Oracle dvll       = new cdha_dvll_Oracle();
            DateTime         tungay     = dngayvao.Value;

            DateTime  denngay = dngayra.Value;
            string    title   = "BÁO CÁO ";
            DataTable dt      = dvll.f_getBAOCAO_M02_TRAKQ_khu(tungay, denngay, AccessData.s_makhuvuc);
            frmReport a       = new frmReport(d, dt, reportname, title, txtHoTen.Text, "Giam đốc", "", "", "", "", "", "", "");

            a.Show();
        }
コード例 #7
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);
                }
            }
        }
コード例 #8
0
        private void f_load_after()
        {
            cdha_dvll_Oracle dvll_Ora = new cdha_dvll_Oracle();
            DateTime         tungay   = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay  = m_format.DateTime_parse(haison1.denngay);

            DataTable dtcp = dvll_Ora.f_getCLS_DADUYET(tungay, denngay, txtMaBN.Text, "-1");

            ddsdaduyet.Rows.Clear();

            foreach (DataRow item in dtcp.Rows)
            {
                ddsdaduyet.Rows.Add(item.ItemArray);
            }
            format_grid();
        }
コード例 #9
0
        private void f_load_after()
        {
            cdha_dvll_Oracle dvll_Ora = new cdha_dvll_Oracle();
            DateTime         tungay   = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay  = m_format.DateTime_parse(haison1.denngay);

            DataTable dtcp = dvll_Ora.f_getCLS_daduyet_bophan(tungay, denngay, txtMaBN.Text, "1", cbCDHA_loai.SelectedValue.ToString());

            ddsdaduyet.Rows.Clear();

            foreach (DataRow item in dtcp.Rows)
            {
                ddsdaduyet.Rows.Add(item.ItemArray);
            }
            lbSoLuong.Text = ddsdaduyet.Rows.Count.ToString();
        }
コード例 #10
0
        private void f_load_after()
        {
            cdha_dvll_Oracle dvll_Ora = new cdha_dvll_Oracle();
            DateTime         tungay   = dngayvao.Value;
            DateTime         denngay  = dngayra.Value;

            DataTable dtcp = dvll_Ora.f_get_after_CDHAnoitru(tungay, denngay, txtMaBN.Text, "-1", cbarea.SelectedValue.ToString());

            ddsdaduyet.Rows.Clear();

            foreach (DataRow item in dtcp.Rows)
            {
                ddsdaduyet.Rows.Add(item.ItemArray);
            }
            format_grid();
        }
コード例 #11
0
        private void button1_Click(object sender, EventArgs e)
        {
            AccessData       d          = new AccessData();
            string           reportname = "BCPHIM.rpt";
            cdha_dvll_Oracle dvll       = new cdha_dvll_Oracle();
            DateTime         tungay     = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay    = m_format.DateTime_parse(haison1.denngay);

            if (cbLoai.SelectedIndex == 1)
            {
                reportname = "BCPHIM_MONTH.rpt";
            }
            string    title = haison1.s_title.Replace("Báo cáo ", "").ToUpper();
            DataTable dt    = dvll.f_getBAOCAO_CDHA_PHIM(tungay, denngay, treeview_room.get_Ma);
            frmReport a     = new frmReport(d, dt, reportname, title, "ht", "gd", "", "", "", "", "", "", "");

            a.Show();
        }
コード例 #12
0
        private void button1_Click(object sender, EventArgs e)
        {
            AccessData       d          = new AccessData();
            string           reportname = "BCPHIM.rpt";
            cdha_dvll_Oracle dvll       = new cdha_dvll_Oracle();
            DateTime         tungay     = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay    = m_format.DateTime_parse(haison1.denngay);

            if (cbLoai.SelectedIndex == 1)
            {
                reportname = "BCPHIM_MONTH.rpt";
            }
            string    title = haison1.s_title.Replace("Báo cáo ", "").ToUpper();
            DataTable dt    = dvll.f_getBAOCAO_PHIMDV(tungay, denngay, treeView_HAISON1.get_Ma.Trim(','));
            frmReport a     = new frmReport(d, dt, reportname, title, txtHoTen.Text, txtGiamDoc.Text, "", "", "", "", "", "", "");

            a.Show();
        }
コード例 #13
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();
                }
            }
        }
コード例 #14
0
        private void f_load_before()
        {
            try
            {
                cdha_dvll_Oracle dataOracle = new cdha_dvll_Oracle();
                //IFormatProvider culture = new  CultureInfoConverter("en-US", true);
                //f_load_after();

                DateTime  ngayvao = dngayvao.Value;
                DateTime  ngayra  = dngayra.Value;
                DataTable dtcp    = dataOracle.f_getv_ttrvkp_ct_ALL3(txtMaBN.Text, "", ngayvao, ngayra, "").Tables[0];
                dview.Rows.Clear();

                foreach (DataRow item in dtcp.Rows)
                {
                    dview.Rows.Add(item.ItemArray);
                }
            }
            catch { }
        }
コード例 #15
0
        private void f_load_before()
        {
            try
            {
                cdha_dvll_Oracle dataOracle = new cdha_dvll_Oracle();
                //IFormatProvider culture = new  CultureInfoConverter("en-US", true);
                f_load_after();
                string    mavaovien  = "";
                DateTime  ngayvao    = dngayvao.Value;
                DateTime  ngayra     = dngayra.Value;
                string    s_loaicdha = cbCDHA_loai.SelectedValue.ToString();
                DataTable dtcp       = dataOracle.f_get_cdha_bv(txtMaBN.Text, "", ngayvao, ngayra, "1", s_loaicdha).Tables[0];
                dview.Rows.Clear();

                foreach (DataRow item in dtcp.Rows)
                {
                    dview.Rows.Add(item.ItemArray);
                }
            }
            catch { }
        }
コード例 #16
0
        private void f_suadaduyet()
        {
            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)
                {
                    DateTime ngayth = m_format.DateTime_parse(item.Cells["ngayth2"].Value.ToString());
                    if (f_kiemtra_locked(ngayth))
                    {
                        string s_id = item.Cells["id_"].Value.ToString();
                        dvll_Oracle.f_delete(long.Parse(s_id));
                        cdha_hen_Oracle henOracle = new cdha_hen_Oracle();
                        henOracle.f_update_dathuchien("0", s_id);
                    }
                }
            }
        }
コード例 #17
0
        private void f_load_before()
        {
            cdha_dvll_Oracle dvll_Ora = new cdha_dvll_Oracle();
            DateTime         tungay   = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay  = m_format.DateTime_parse(haison1.denngay);

            DataTable dtcp = dvll_Ora.f_getCLS_chuaduyet_bophan(tungay, denngay, txtMaBN.Text, "0", cbCDHA_loai.SelectedValue.ToString());

            dschuaduyet.Rows.Clear();

            foreach (DataRow item in dtcp.Rows)
            {
                dschuaduyet.Rows.Add(item.ItemArray);
            }
            if (txtMaBN.Text.Length == 8)
            {
                foreach (DataGridViewRow item in dschuaduyet.Rows)
                {
                    item.Cells[0].Value = true;
                }
            }
        }
コード例 #18
0
        private void f_xoaduyet()
        {
            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();
                    string    s_id = item.Cells["id_"].Value.ToString();
                    dvll.ID           = long.Parse(s_id);
                    dvll.DONE         = "0";
                    dvll.NGAYTHUCHIEN = DateTime.Now;
                    dvll_Oracle.f_update(dvll);

                    cdha_hen_Oracle henOracle = new cdha_hen_Oracle();
                    henOracle.f_update_dathuchien("0", s_id);
                }
            }
        }
コード例 #19
0
        private void f_init_addmodul()
        {
            cdha_dvll_Oracle cdha_Ora = new cdha_dvll_Oracle();

            DateTime  tungay      = m_format.DateTime_parse(haison1.tungay);
            DateTime  denngay     = m_format.DateTime_parse(haison1.denngay);
            DataTable dtdm_dichvu = cdha_Ora.d_getCLS(tungay, denngay, txtMaBN.Text);

            tl_danhmuc.datasource = dtdm_dichvu;
            tl_danhmuc.set_labelname("Dịch vụ");


            //DataTable dtdm_khoaphong = dataOracle.d_getDMKhoaPhong();
            //cbDanhMucKP.DataSource = dtdm_khoaphong;
            //cbDanhMucKP.DisplayMember = "TEN";
            //cbDanhMucKP.ValueMember = "ID";
            //cbDanhMucKP.SelectedIndex = 0;
            //cbLoai.SelectedIndex = 0;
            //cbdoituong.DataSource = dataOracle.d_getDMDoiTuong();
            //cbdoituong.DisplayMember = "ten";
            //cbdoituong.ValueMember = "ma";
            //cbdoituong.SelectedIndex = 0;
        }
コード例 #20
0
        private void button2_Click(object sender, EventArgs e)
        {
            AccessData d          = new AccessData();
            string     reportname = "rpt_baocaoCDHA_DV_M02.rpt";
            int        loai       = cbLoai.SelectedIndex;

            switch (loai)
            {
            case 1: reportname = "rpt_baocaoCDHA_DV_M02_MONTH.rpt";
                break;

            case 2: reportname = "rpt_baocaoCDHA_DV_M02_NHOM.rpt";
                break;
            }
            cdha_dvll_Oracle dvll    = new cdha_dvll_Oracle();
            DateTime         tungay  = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay = m_format.DateTime_parse(haison1.denngay);
            string           title   = haison1.s_title.Replace("Báo cáo ", "").ToUpper();
            DataTable        dt      = dvll.f_getBAOCAO_M02_dathuchien(tungay, denngay, treeView_HAISON1.get_Ma.Trim(','));
            frmReport        a       = new frmReport(d, dt, reportname, title, txtHoTen.Text, "Giam đốc", "", "", "", "", "", "", "");

            a.Show();
        }
コード例 #21
0
        private void save()
        {
            cdha_dvll_Oracle cdhadvl_O = new cdha_dvll_Oracle();

            // DataGridViewRow row = dview.SelectedRows[0];
            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();
                    vct.NGAYCHUP   = dngaybc.Value;
                    vct.MABN       = txtMaBN.Text;
                    vct.STT        = stt;
                    vct.Cdhakhu    = AccessData.s_makhuvuc;


                    cdhadvl_O.f_insert(vct);
                    stt++;
                }
            }
        }
コード例 #22
0
        private void btInBaoCao_Click(object sender, EventArgs e)
        {
            AccessData       d          = new AccessData();
            string           reportname = "rpt_baocaoCDHA_DV_M01DT.rpt";
            cdha_dvll_Oracle dvll       = new cdha_dvll_Oracle();
            DateTime         tungay     = m_format.DateTime_parse(haison1.tungay);
            DateTime         denngay    = m_format.DateTime_parse(haison1.denngay);
            int loai = cbLoai.SelectedIndex;

            switch (loai)
            {
            case 1: reportname = "rpt_baocaoCDHA_DV_M01DT_MONTH.rpt";
                break;

            case 2: reportname = "rpt_baocaoCDHA_DV_M01DT_NHOM.rpt";
                break;
            }

            string    title = haison1.s_title.Replace("Báo cáo ", "").ToUpper();
            DataTable dt    = dvll.f_getBAOCAO_M01(tungay, denngay, AccessData.s_makhuvuc);
            frmReport a     = new frmReport(d, dt, reportname, title, txtHoTen.Text, txtGiamDoc.Text, "", "", "", "", "", "", "");

            a.Show();
        }