Exemple #1
0
        private void m_cmd_BO_tu_choi_Click(object sender, EventArgs e)
        {
            decimal id_nguoi_tao;

            try
            {
                fill_data_to_m_us();
                if (m_us.dcID_LOAI_THAO_TAC == 313)
                {
                    US_DUNG_CHUNG v_us_dung_chung = new US_DUNG_CHUNG();
                    DataSet       v_ds            = new DataSet();
                    v_ds.Tables.Add(new DataTable());
                    v_us_dung_chung.FillDatasetWithQuery(v_ds, "SELECT id FROM GD_LOG_DAT_HANG gldh WHERE gldh.ID_LOAI_THAO_TAC in (295,311) AND gldh.ID_GD_DAT_HANG = " + m_us.dcID_DON_HANG + "ORDER BY id DESC");
                    US_GD_LOG_DAT_HANG v_us_log = new US_GD_LOG_DAT_HANG(CIPConvert.ToDecimal(v_ds.Tables[0].Rows[0]["ID"].ToString()));
                    id_nguoi_tao = v_us_log.dcID_NGUOI_TAO_THAO_TAC;
                }
                else
                {
                    id_nguoi_tao = m_us.dcID_NGUOI_TAO;
                }
                f107_tu_choi_don_hang v_f107 = new f107_tu_choi_don_hang();
                v_f107.displayForRefuse(m_us, id_nguoi_tao);
                load_data_2_grid();
            }
            catch (Exception v_e)
            {
                CSystemLog_100.ExceptionHandle(v_e);
            }
        }
        private void m_cmd_BO_tu_choi_Click(object sender, EventArgs e)
        {
            decimal id_nguoi_tao;
            try
            {
                fill_data_to_m_us();
                if(m_us.dcID_LOAI_THAO_TAC == 313)
                {
                    US_DUNG_CHUNG v_us_dung_chung = new US_DUNG_CHUNG();
                    DataSet v_ds = new DataSet();
                    v_ds.Tables.Add(new DataTable());
                    v_us_dung_chung.FillDatasetWithQuery(v_ds, "SELECT id FROM GD_LOG_DAT_HANG gldh WHERE gldh.ID_LOAI_THAO_TAC in (295,311) AND gldh.ID_GD_DAT_HANG = " + m_us.dcID_DON_HANG + "ORDER BY id DESC");
                    US_GD_LOG_DAT_HANG v_us_log = new US_GD_LOG_DAT_HANG(CIPConvert.ToDecimal(v_ds.Tables[0].Rows[0]["ID"].ToString()));
                    id_nguoi_tao = v_us_log.dcID_NGUOI_TAO_THAO_TAC;
                }
                else
                {
                    id_nguoi_tao = m_us.dcID_NGUOI_TAO;
                }
                f107_tu_choi_don_hang v_f107 = new f107_tu_choi_don_hang();
                v_f107.displayForRefuse(m_us, id_nguoi_tao);
                load_data_2_grid();

            }
            catch (Exception v_e)
            {

                CSystemLog_301.ExceptionHandle(v_e);
            }
        }
        private void m_cmd_tu_choi_Click(object sender, EventArgs e)
        {
            try
            {
                fill_data_to_m_us();

                update_log_trang_thai_don_hang();
                f107_tu_choi_don_hang v_f107 = new f107_tu_choi_don_hang();
                v_f107.displayForRefuse(m_us);
                MessageBox.Show("Thành công!");
            }
            catch (Exception v_e)
            {

                CSystemLog_301.ExceptionHandle(v_e);
            }
        }