protected void m_cbo_vpp_SelectedIndexChanged(object sender, EventArgs e)
 {
     try
     {
         m_lbl_thong_bao.Visible = false;
         US_V_DM_VPP v_us = new US_V_DM_VPP();
         DS_V_DM_VPP v_ds = new DS_V_DM_VPP();
         v_us.FillDataset(v_ds, "where id_vpp=" + m_cbo_vpp.SelectedValue);
         m_lbl_don_vi_tinh.Text = v_ds.Tables[0].Rows[0]["DON_VI_TINH"].ToString();
         m_lbl_don_gia.Text = CIPConvert.ToStr(v_ds.Tables[0].Rows[0]["DON_GIA_GOM_VAT"], "#,###") + " (VNĐ)";
         m_hdf_don_gia.Value = CIPConvert.ToStr(v_ds.Tables[0].Rows[0]["DON_GIA_CHUA_VAT"]);
         //m_txt_so_luong.Focus();
     }
     catch (Exception v_e)
     {
         CSystemLog_301.ExceptionHandle(this, v_e);
     }
 }
 private void load_data_2_grid()
 {
     decimal v_dc_tu_khoa = CIPConvert.ToDecimal(m_cbo_tim_kiem.SelectedValue);
     decimal v_id_nha_cc = CIPConvert.ToDecimal(m_cbo_nha_cc.SelectedValue);
     DS_V_DM_VPP v_ds = new DS_V_DM_VPP();
     US_V_DM_VPP v_us = new US_V_DM_VPP();
     v_us.FillDatasetsearch(v_ds, v_id_nha_cc, v_dc_tu_khoa);
     m_grv_dm_vpp.DataSource = v_ds.V_DM_VPP;
     string v_str_thong_tin = " (Có " + v_ds.V_DM_VPP.Rows.Count + " mặt hàng)";
     m_lbl_thong_tim_grv_dm_vpp.Text = v_str_thong_tin;
     m_grv_dm_vpp.DataBind();
 }
 private void load_don_vi_tinh_don_gia()
 {
     US_V_DM_VPP v_us = new US_V_DM_VPP();
     DS_V_DM_VPP v_ds = new DS_V_DM_VPP();
     v_us.FillDataset(v_ds, "where id_vpp=" + m_cbo_vpp.SelectedValue);
     m_lbl_don_vi_tinh.Text = v_ds.Tables[0].Rows[0]["DON_VI_TINH"].ToString();
     m_lbl_don_gia.Text = CIPConvert.ToStr(v_ds.Tables[0].Rows[0]["DON_GIA_GOM_VAT"], "#,###") + " (VNĐ)";
     m_hdf_don_gia.Value = CIPConvert.ToStr(v_ds.Tables[0].Rows[0]["DON_GIA_CHUA_VAT"]);
 }
 private void load_cbo_VPP()
 {
     US_V_DM_VPP v_us = new US_V_DM_VPP();
     DS_V_DM_VPP v_ds = new DS_V_DM_VPP();
     v_us.FillDataset(v_ds);
     m_cbo_vpp.DataSource = v_ds.V_DM_VPP;
     m_cbo_vpp.DataValueField = V_DM_VPP.ID_VPP;
     m_cbo_vpp.DataTextField = V_DM_VPP.TEN_VPP;
     m_cbo_vpp.DataBind();
 }
    private void us_object_to_form_don_hang_de()
    {
        US_GD_DON_DAT_HANG_DETAIL v_us_don_hang_de = new US_GD_DON_DAT_HANG_DETAIL(CIPConvert.ToDecimal(m_hdf_ID_GD_DON_DAT_HANG_DE.Value));
        US_V_DM_VPP v_us = new US_V_DM_VPP();
        DS_V_DM_VPP v_ds = new DS_V_DM_VPP();

        v_us.FillDataset(v_ds, "where id_vpp =" + v_us_don_hang_de.dcID_VPP);
        m_txt_so_luong.Text = v_us_don_hang_de.dcSO_LUONG.ToString();
        m_cbo_vpp.DataTextField = v_ds.Tables[0].Rows[0]["TEN_VPP"].ToString();
        m_lbl_don_gia.Text = CIPConvert.ToStr(v_ds.Tables[0].Rows[0]["DON_GIA_GOM_VAT"], "#,###") + " (VNĐ)";
        if (v_us_don_hang_de.strMO_TA != null)
            m_txt_mo_ta.Text = CIPConvert.ToStr(v_us_don_hang_de.strMO_TA);
        else m_txt_mo_ta.Text = "";
    }
Esempio n. 6
0
 private void us_object2grid(US_V_DM_VPP i_us
     , int i_grid_row)
 {
     DataRow v_dr = (DataRow) m_fg.Rows[i_grid_row].UserData;
     i_us.Me2DataRow(v_dr);
     m_obj_trans.DataRow2GridRow(v_dr, i_grid_row);
 }
Esempio n. 7
0
 private void grid2us_object(US_V_DM_VPP i_us
     , int i_grid_row)
 {
     DataRow v_dr;
     v_dr = (DataRow) m_fg.Rows[i_grid_row].UserData;
     m_obj_trans.GridRow2DataRow(i_grid_row,v_dr);
     i_us.DataRow2Me(v_dr);
 }
Esempio n. 8
0
 private void delete_v_dm_vpp()
 {
     if (!CGridUtils.IsThere_Any_NonFixed_Row(m_fg)) return;
     if (!CGridUtils.isValid_NonFixed_RowIndex(m_fg, m_fg.Row)) return;
     if (BaseMessages.askUser_DataCouldBeDeleted(8) != BaseMessages.IsDataCouldBeDeleted.CouldBeDeleted)  return;
     US_V_DM_VPP v_us = new US_V_DM_VPP();
     grid2us_object(v_us, m_fg.Row);
     try {
         v_us.BeginTransaction();
         v_us.Delete();
         v_us.CommitTransaction();
         m_fg.Rows.Remove(m_fg.Row);
     }
     catch (Exception v_e) {
         v_us.Rollback();
         CDBExceptionHandler v_objErrHandler = new CDBExceptionHandler(v_e,
             new CDBClientDBExceptionInterpret());
         v_objErrHandler.showErrorMessage();
     }
 }
Esempio n. 9
0
 public void display_for_update(US_V_DM_VPP ip_us_v)
 {
     m_e_form_mode = DataEntryFormMode.UpdateDataState;
     us_obj_2_form(ip_us_v);
     this.ShowDialog();
 }
Esempio n. 10
0
 private void us_obj_2_form(US_V_DM_VPP ip_v_us)
 {
     m_us.dcID = ip_v_us.dcID_VPP;
     m_txt_ma_mat_hang.Text = ip_v_us.strMA;
     m_txt_ten_mat_hang.Text = ip_v_us.strTEN_VPP;
     m_txt_don_vi_tinh.Text = ip_v_us.strDON_VI_TINH;
     m_txt_don_gia.Text = ip_v_us.dcDON_GIA_CHUA_VAT.ToString();
     m_cbo_nha_cc.SelectedValue = ip_v_us.dcID_NHA_CUNG_CAP;
     m_txt_gioi_han.Text = ip_v_us.strGIOI_HAN_VPP;
 }