Ejemplo n.º 1
0
        private void update_thoi_gian_hoan_thanh_don_hang()
        {
            US_GD_DAT_HANG v_us = new US_GD_DAT_HANG(m_us.dcID_DON_HANG);

            v_us.datTHOI_GIAN_HOAN_THANH = System.DateTime.Now;
            v_us.Update();
        }
Ejemplo n.º 2
0
        private void update_thoi_gian_hoan_thanh(US_GD_DAT_HANG M_us)
        {
            US_GD_DAT_HANG v_us = new US_GD_DAT_HANG(M_us.dcID);

            v_us.datTHOI_GIAN_HOAN_THANH = System.DateTime.Now;
            v_us.Update();
        }
Ejemplo n.º 3
0
 private void update_danh_gia()
 {
     if (m_radio_chua_dat.Checked)
     {
         m_us.dcID_DANH_GIA_TU_USER_DAT_HANG = 127;
     }
     else if (m_radio_hoi_duoi.Checked)
     {
         m_us.dcID_DANH_GIA_TU_USER_DAT_HANG = 126;
     }
     else if (m_radio_xong_viec.Checked)
     {
         m_us.dcID_DANH_GIA_TU_USER_DAT_HANG = 125;
     }
     else if (m_radio_hai_long.Checked)
     {
         m_us.dcID_DANH_GIA_TU_USER_DAT_HANG = 124;
     }
     else if (m_radio_rat_hai_long.Checked)
     {
         m_us.dcID_DANH_GIA_TU_USER_DAT_HANG = 123;
     }
     m_us.Update();
     MessageBox.Show("Cám ơn bạn đã đánh giá!");
 }
Ejemplo n.º 4
0
        private void update_trang_thai_don_hang(US_GD_DAT_HANG v_us)
        {
            US_DUNG_CHUNG v_us_dc = new US_DUNG_CHUNG();
            DataSet       v_ds    = new DataSet();

            v_ds.Tables.Add(new DataTable());
            v_us_dc.FillDatasetWithQuery(v_ds, "SELECT * FROM V_GD_DAT_HANG_GD_LOG_DAT_HANG WHERE THAO_TAC_HET_HAN_YN = 'N' AND [ID_DON_HANG] = " + v_us.dcID.ToString());
            for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
            {
                US_GD_LOG_DAT_HANG V_us = new US_GD_LOG_DAT_HANG(CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i]["ID"].ToString()));
                V_us.strTHAO_TAC_HET_HAN_YN = "Y";
                V_us.Update();
            }
            //cập nhật thời gian hoàn thành cho đơn hàng
            US_GD_DAT_HANG v_us1 = new US_GD_DAT_HANG(v_us.dcID);

            v_us1.datTHOI_GIAN_HOAN_THANH = System.DateTime.Now;
            v_us1.Update();
        }
        private void tu_dong_danh_gia()
        {
            US_DUNG_CHUNG v_us = new US_DUNG_CHUNG();
            DataSet       v_ds = new DataSet();

            v_ds.Tables.Add(new DataTable());
            string v_str_query = "SELECT * FROM GD_DAT_HANG WHERE  THOI_GIAN_HOAN_THANH is not null AND ID_DANH_GIA_TU_USER_DAT_HANG IS NULL";

            v_us.FillDatasetWithQuery(v_ds, v_str_query);
            for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++)
            {
                US_GD_DAT_HANG v_us_gd_dat_hang       = new US_GD_DAT_HANG(CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i]["ID"].ToString()));
                DateTime       v_thoi_gian_hoan_thanh = v_us_gd_dat_hang.datTHOI_GIAN_HOAN_THANH.AddDays(3);
                if (System.DateTime.Compare(v_thoi_gian_hoan_thanh, System.DateTime.Now) == -1)
                {
                    v_us_gd_dat_hang.dcID_DANH_GIA_TU_USER_DAT_HANG = 124;
                    v_us_gd_dat_hang.Update();
                }
            }
        }