示例#1
0
        public List <NS_QuaTrinhCongTacInfo> GetList(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
        {
            List <NS_QuaTrinhCongTacInfo> oNS_QuaTrinhCongTacInfoList = new List <NS_QuaTrinhCongTacInfo>();
            DataTable dtb = Get(pNS_QuaTrinhCongTacInfo);

            if (dtb != null)
            {
                for (int i = 0; i < dtb.Rows.Count; i++)
                {
                    oNS_QuaTrinhCongTacInfo = new NS_QuaTrinhCongTacInfo();

                    oNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID = int.Parse(dtb.Rows[i]["NS_QuaTrinhCongTacID"].ToString());
                    oNS_QuaTrinhCongTacInfo.IDNS_GiaoVien        = int.Parse(dtb.Rows[i]["IDNS_GiaoVien"].ToString());
                    oNS_QuaTrinhCongTacInfo.NoiCongTac           = dtb.Rows[i]["NoiCongTac"].ToString();
                    oNS_QuaTrinhCongTacInfo.NoiDungCongTac       = dtb.Rows[i]["NoiDungCongTac"].ToString();
                    oNS_QuaTrinhCongTacInfo.ChucVuDamNhiem       = dtb.Rows[i]["ChucVuDamNhiem"].ToString();
                    oNS_QuaTrinhCongTacInfo.TuNgay        = DateTime.Parse(dtb.Rows[i]["TuNgay"].ToString());
                    oNS_QuaTrinhCongTacInfo.DenNgay       = DateTime.Parse(dtb.Rows[i]["DenNgay"].ToString());
                    oNS_QuaTrinhCongTacInfo.DiNuocNgoai   = bool.Parse(dtb.Rows[i]["DiNuocNgoai"].ToString());
                    oNS_QuaTrinhCongTacInfo.IDDM_QuocTich = int.Parse(dtb.Rows[i]["IDDM_QuocTich"].ToString());

                    oNS_QuaTrinhCongTacInfoList.Add(oNS_QuaTrinhCongTacInfo);
                }
            }
            return(oNS_QuaTrinhCongTacInfoList);
        }
示例#2
0
        public void Delete(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_QuaTrinhCongTacID", SqlDbType.Int, pNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID));

            RunProcedure("sp_NS_QuaTrinhCongTac_Delete", colParam);
        }
示例#3
0
        public DataTable Get(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_QuaTrinhCongTacID", SqlDbType.Int, pNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID));

            return(RunProcedureGet("sp_NS_QuaTrinhCongTac_Get", colParam));
        }
示例#4
0
        public int Add(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
        {
            int ID = 0;

            ID            = oDNS_QuaTrinhCongTac.Add(pNS_QuaTrinhCongTacInfo);
            mErrorMessage = oDNS_QuaTrinhCongTac.ErrorMessages;
            mErrorNumber  = oDNS_QuaTrinhCongTac.ErrorNumber;
            return(ID);
        }
示例#5
0
 public void ToDataRow(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo, ref DataRow dr)
 {
     dr[pNS_QuaTrinhCongTacInfo.strNS_QuaTrinhCongTacID] = pNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID;
     dr[pNS_QuaTrinhCongTacInfo.strIDNS_GiaoVien]        = pNS_QuaTrinhCongTacInfo.IDNS_GiaoVien;
     dr[pNS_QuaTrinhCongTacInfo.strNoiCongTac]           = pNS_QuaTrinhCongTacInfo.NoiCongTac;
     dr[pNS_QuaTrinhCongTacInfo.strNoiDungCongTac]       = pNS_QuaTrinhCongTacInfo.NoiDungCongTac;
     dr[pNS_QuaTrinhCongTacInfo.strChucVuDamNhiem]       = pNS_QuaTrinhCongTacInfo.ChucVuDamNhiem;
     dr[pNS_QuaTrinhCongTacInfo.strTuNgay]        = pNS_QuaTrinhCongTacInfo.TuNgay;
     dr[pNS_QuaTrinhCongTacInfo.strDenNgay]       = pNS_QuaTrinhCongTacInfo.DenNgay;
     dr[pNS_QuaTrinhCongTacInfo.strDiNuocNgoai]   = pNS_QuaTrinhCongTacInfo.DiNuocNgoai;
     dr[pNS_QuaTrinhCongTacInfo.strIDDM_QuocTich] = pNS_QuaTrinhCongTacInfo.IDDM_QuocTich;
 }
示例#6
0
 public frmQuaTrinhCongTac()
 {
     InitializeComponent();
     oBGiaoVien              = new cBNS_GiaoVien();
     pGiaoVienInfo           = new NS_GiaoVienInfo();
     pDonViInfo              = new NS_DonViInfo();
     oBQuaTrinhCongTac       = new cBNS_QuaTrinhCongTac();
     pNS_QuaTrinhCongTacInfo = new NS_QuaTrinhCongTacInfo();
     SetButton(false);
     btnThem.Enabled = true;
     SetControl(true);
     btnLuu.Enabled     = false;
     dtpDenNgay.Enabled = false;
 }
示例#7
0
        public void Update(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@IDNS_GiaoVien", SqlDbType.Int, pNS_QuaTrinhCongTacInfo.IDNS_GiaoVien));
            colParam.Add(CreateParam("@NoiCongTac", SqlDbType.NVarChar, pNS_QuaTrinhCongTacInfo.NoiCongTac));
            colParam.Add(CreateParam("@NoiDungCongTac", SqlDbType.NVarChar, pNS_QuaTrinhCongTacInfo.NoiDungCongTac));
            colParam.Add(CreateParam("@ChucVuDamNhiem", SqlDbType.NVarChar, pNS_QuaTrinhCongTacInfo.ChucVuDamNhiem));
            colParam.Add(CreateParam("@TuNgay", SqlDbType.DateTime, pNS_QuaTrinhCongTacInfo.TuNgay));
            colParam.Add(CreateParam("@DenNgay", SqlDbType.DateTime, pNS_QuaTrinhCongTacInfo.DenNgay));
            colParam.Add(CreateParam("@DiNuocNgoai", SqlDbType.Bit, pNS_QuaTrinhCongTacInfo.DiNuocNgoai));
            colParam.Add(CreateParam("@IDDM_QuocTich", SqlDbType.Int, pNS_QuaTrinhCongTacInfo.IDDM_QuocTich));
            colParam.Add(CreateParam("@NS_QuaTrinhCongTacID", SqlDbType.Int, pNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID));

            RunProcedure("sp_NS_QuaTrinhCongTac_Update", colParam);
        }
示例#8
0
 public void ToInfo(ref NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo, DataRow dr)
 {
     pNS_QuaTrinhCongTacInfo.NS_QuaTrinhCongTacID = int.Parse(dr[pNS_QuaTrinhCongTacInfo.strNS_QuaTrinhCongTacID].ToString());
     pNS_QuaTrinhCongTacInfo.IDNS_GiaoVien        = int.Parse("0" + dr[pNS_QuaTrinhCongTacInfo.strIDNS_GiaoVien]);
     pNS_QuaTrinhCongTacInfo.NoiCongTac           = dr[pNS_QuaTrinhCongTacInfo.strNoiCongTac].ToString();
     pNS_QuaTrinhCongTacInfo.NoiDungCongTac       = dr[pNS_QuaTrinhCongTacInfo.strNoiDungCongTac].ToString();
     pNS_QuaTrinhCongTacInfo.ChucVuDamNhiem       = dr[pNS_QuaTrinhCongTacInfo.strChucVuDamNhiem].ToString();
     if (dr[pNS_QuaTrinhCongTacInfo.strTuNgay].ToString() != "")
     {
         pNS_QuaTrinhCongTacInfo.TuNgay = DateTime.Parse(dr[pNS_QuaTrinhCongTacInfo.strTuNgay].ToString());
     }
     if (dr[pNS_QuaTrinhCongTacInfo.strDenNgay].ToString() != "")
     {
         pNS_QuaTrinhCongTacInfo.DenNgay = DateTime.Parse(dr[pNS_QuaTrinhCongTacInfo.strDenNgay].ToString());
     }
     pNS_QuaTrinhCongTacInfo.DiNuocNgoai   = bool.Parse(dr[pNS_QuaTrinhCongTacInfo.strDiNuocNgoai].ToString());
     pNS_QuaTrinhCongTacInfo.IDDM_QuocTich = int.Parse("0" + dr[pNS_QuaTrinhCongTacInfo.strIDDM_QuocTich]);
 }
示例#9
0
 public void Delete(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
 {
     oDNS_QuaTrinhCongTac.Delete(pNS_QuaTrinhCongTacInfo);
     mErrorMessage = oDNS_QuaTrinhCongTac.ErrorMessages;
     mErrorNumber  = oDNS_QuaTrinhCongTac.ErrorNumber;
 }
示例#10
0
 public DataTable Get(NS_QuaTrinhCongTacInfo pNS_QuaTrinhCongTacInfo)
 {
     return(oDNS_QuaTrinhCongTac.Get(pNS_QuaTrinhCongTacInfo));
 }