public US_GRID_GIAI_NGAN(decimal i_dbID) { pm_objDS = new DS_GRID_GIAI_NGAN(); pm_strTableName = c_TableName; IMakeSelectCmd v_objMkCmd = new CMakeAndSelectCmd(pm_objDS, c_TableName); v_objMkCmd.AddCondition("ID", i_dbID, eKieuDuLieu.KieuNumber, eKieuSoSanh.Bang); SqlCommand v_cmdSQL; v_cmdSQL = v_objMkCmd.getSelectCmd(); this.FillDatasetByCommand(pm_objDS, v_cmdSQL); pm_objDR = getRowClone(pm_objDS.Tables[pm_strTableName].Rows[0]); }
public US_GRID_GIAI_NGAN() { pm_objDS = new DS_GRID_GIAI_NGAN(); pm_strTableName = c_TableName; pm_objDR = pm_objDS.Tables[pm_strTableName].NewRow(); }
public void get_grid_uy_nhiem_chi_dataset(DS_GRID_GIAI_NGAN op_ds , decimal ip_dc_id_don_vi , decimal ip_dc_id_dm_uy_nhiem_chi) { CStoredProc v_sp = new CStoredProc("pr_get_grid_uy_nhiem_chi"); v_sp.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi); v_sp.addDecimalInputParam("@ip_dc_id_dm_uy_nhiem_chi", ip_dc_id_dm_uy_nhiem_chi); v_sp.fillDataSetByCommand(this, op_ds); }
public void get_grid_giai_ngan(DS_GRID_GIAI_NGAN op_ds , decimal ip_dc_id_don_vi , decimal ip_dc_id_dm_uy_nhiem_chi , decimal ip_dc_id_user , string ip_str_is_nguon_ns) { CStoredProc v_sp = new CStoredProc("pr_F304_nhap_giai_ngan_theo_unc"); v_sp.addDecimalInputParam("@ip_dc_id_don_vi", ip_dc_id_don_vi); v_sp.addDecimalInputParam("@ip_dc_id_dm_uy_nhiem_chi", ip_dc_id_dm_uy_nhiem_chi); v_sp.addDecimalInputParam("@ip_dc_id_user", ip_dc_id_user); v_sp.addNVarcharInputParam("@ip_str_is_nguon_ns", ip_str_is_nguon_ns); v_sp.fillDataSetByCommand(this, op_ds); }
private void load_data_to_grid_chi_tiet_uy_nhiem_chi() { US_GRID_GIAI_NGAN v_us = new US_GRID_GIAI_NGAN(); DS_GRID_GIAI_NGAN v_ds = new DS_GRID_GIAI_NGAN(); v_ds.EnforceConstraints = false; if (m_hdf_id_dm_giai_ngan.Value.Trim().Equals("")) return; v_us.get_grid_giai_ngan( v_ds , CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue) , CIPConvert.ToDecimal(m_hdf_id_dm_giai_ngan.Value) , CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue) , WebformFunctions.getValue_from_query_string<string>( this , FormInfo.QueryString.NGUON_NGAN_SACH , STR_NGUON.QUY_BAO_TRI) ); if (v_ds.Tables.Count > 0) { decimal v_dc_so_tien_thanh_toan_cho_don_vi_huong = 0; decimal v_dc_so_tien_nop_thue = 0; for (int i = 0; i < v_ds.Tables[0].Rows.Count; i++) { if (!v_ds.Tables[0].Rows[i].IsNull(GRID_GIAI_NGAN.ID)) { if (!v_ds.Tables[0].Rows[i][GRID_GIAI_NGAN.ID].ToString().Trim().Equals("-1")) { v_dc_so_tien_thanh_toan_cho_don_vi_huong += CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i][GRID_GIAI_NGAN.SO_TIEN_TTCDVH].ToString()); v_dc_so_tien_nop_thue += CIPConvert.ToDecimal(v_ds.Tables[0].Rows[i][GRID_GIAI_NGAN.SO_TIEN_NT].ToString()); } } } m_txt_nt_so_tien_nop_thue.Text = IP.Core.IPCommon.CRead.ChuyenSo(v_dc_so_tien_nop_thue.ToString()); m_txt_ttdvh_so_tien_thanh_toan.Text = IP.Core.IPCommon.CRead.ChuyenSo(v_dc_so_tien_thanh_toan_cho_don_vi_huong.ToString()); } m_grv_unc.DataSource = v_ds.Tables[0]; m_grv_unc.DataBind(); //Nếu đang xem UNC của đơn vị khác thì không được sửa dữ liệu if (m_ddl_don_vi.SelectedValue != Person.get_id_don_vi().ToString()) { m_grv_unc.Columns[5].Visible = false;//Cột thao tác } else { m_grv_unc.Columns[5].Visible = true; } }
private void data_to_grid_unc() { //Xem form có phải đang ở chế độ giải ngân cho Nguồn Ngân sách không string v_str_is_nguon_ns = "N"; if (Request.QueryString["ip_nguon_ns"] != null) { if (Request.QueryString["ip_nguon_ns"].ToString().Equals("Y")) v_str_is_nguon_ns = "Y"; } US_GRID_GIAI_NGAN v_us = new US_GRID_GIAI_NGAN(); DS_GRID_GIAI_NGAN v_ds = new DS_GRID_GIAI_NGAN(); v_ds.EnforceConstraints = false; if (m_hdf_id_dm_uy_nhiem_chi.Value.Trim().Equals("")) return; v_us.get_grid_giai_ngan(v_ds, CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue), CIPConvert.ToDecimal(m_hdf_id_dm_uy_nhiem_chi.Value), CIPConvert.ToDecimal(m_ddl_don_vi.SelectedValue), v_str_is_nguon_ns); m_grv_unc.DataSource = v_ds.Tables[0]; m_grv_unc.DataBind(); //kiem tra neu khong phai don vi minh thi khong cho sua du lieu if (m_ddl_don_vi.SelectedValue != Person.get_id_don_vi().ToString()) { m_grv_unc.Columns[5].Visible = false;//cot Thao tac } else { m_grv_unc.Columns[5].Visible = true; } }