Exemplo n.º 1
0
 public frmBangLuong()
 {
     InitializeComponent();
     dtpTinhDenNgay.EditValue = DateTime.Now;
     oBNS_Luong    = new cBNS_Luong();
     pNS_LuongInfo = new NS_LuongInfo();
 }
Exemplo n.º 2
0
        public List <NS_LuongInfo> GetList(NS_LuongInfo pNS_LuongInfo)
        {
            List <NS_LuongInfo> oNS_LuongInfoList = new List <NS_LuongInfo>();
            DataTable           dtb = Get(pNS_LuongInfo);

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

                    oNS_LuongInfo.NS_LuongID         = int.Parse(dtb.Rows[i]["NS_LuongID"].ToString());
                    oNS_LuongInfo.IDNS_SoQuyetDinh   = int.Parse(dtb.Rows[i]["IDNS_SoQuyetDinh"].ToString());
                    oNS_LuongInfo.IDNS_GiaoVien      = int.Parse(dtb.Rows[i]["IDNS_GiaoVien"].ToString());
                    oNS_LuongInfo.CongViecDamNhiem   = dtb.Rows[i]["CongViecDamNhiem"].ToString();
                    oNS_LuongInfo.IDNS_NgachCongChuc = int.Parse(dtb.Rows[i]["IDNS_NgachCongChuc"].ToString());
                    oNS_LuongInfo.BacLuong           = int.Parse(dtb.Rows[i]["BacLuong"].ToString());
                    oNS_LuongInfo.HeSoLuong          = double.Parse(dtb.Rows[i]["HeSoLuong"].ToString());
                    oNS_LuongInfo.PhanTramHuong      = double.Parse(dtb.Rows[i]["PhanTramHuong"].ToString());
                    oNS_LuongInfo.TuNgay             = DateTime.Parse(dtb.Rows[i]["TuNgay"].ToString());
                    oNS_LuongInfo.DenNgay            = DateTime.Parse(dtb.Rows[i]["DenNgay"].ToString());

                    oNS_LuongInfoList.Add(oNS_LuongInfo);
                }
            }
            return(oNS_LuongInfoList);
        }
Exemplo n.º 3
0
        public void Delete(NS_LuongInfo pNS_LuongInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_LuongID", SqlDbType.Int, pNS_LuongInfo.NS_LuongID));

            RunProcedure("sp_NS_Luong_Delete", colParam);
        }
Exemplo n.º 4
0
        public DataTable Get(NS_LuongInfo pNS_LuongInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_LuongID", SqlDbType.Int, pNS_LuongInfo.NS_LuongID));

            return(RunProcedureGet("sp_NS_Luong_Get", colParam));
        }
Exemplo n.º 5
0
        public int Add_InfoFull(NS_LuongInfo pNS_LuongInfo)
        {
            int ID = 0;

            ID            = oDNS_Luong.Add_InfoFull(pNS_LuongInfo);
            mErrorMessage = oDNS_Luong.ErrorMessages;
            mErrorNumber  = oDNS_Luong.ErrorNumber;
            return(ID);
        }
Exemplo n.º 6
0
 public void ToDataRow(NS_LuongInfo pNS_LuongInfo, ref DataRow dr)
 {
     dr[pNS_LuongInfo.strNS_LuongID]         = pNS_LuongInfo.NS_LuongID;
     dr[pNS_LuongInfo.strIDNS_SoQuyetDinh]   = pNS_LuongInfo.IDNS_SoQuyetDinh;
     dr[pNS_LuongInfo.strIDNS_GiaoVien]      = pNS_LuongInfo.IDNS_GiaoVien;
     dr[pNS_LuongInfo.strCongViecDamNhiem]   = pNS_LuongInfo.CongViecDamNhiem;
     dr[pNS_LuongInfo.strIDNS_NgachCongChuc] = pNS_LuongInfo.IDNS_NgachCongChuc;
     dr[pNS_LuongInfo.strBacLuong]           = pNS_LuongInfo.BacLuong;
     dr[pNS_LuongInfo.strHeSoLuong]          = pNS_LuongInfo.HeSoLuong;
     dr[pNS_LuongInfo.strPhanTramHuong]      = pNS_LuongInfo.PhanTramHuong;
     dr[pNS_LuongInfo.strTuNgay]             = pNS_LuongInfo.TuNgay;
     dr[pNS_LuongInfo.strDenNgay]            = pNS_LuongInfo.DenNgay;
 }
Exemplo n.º 7
0
        public int Add_InfoFull(NS_LuongInfo pNS_LuongInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@IDNS_GiaoVien", SqlDbType.Int, pNS_LuongInfo.IDNS_GiaoVien));
            colParam.Add(CreateParam("@CongViecDamNhiem", SqlDbType.NVarChar, pNS_LuongInfo.CongViecDamNhiem));
            colParam.Add(CreateParam("@IDNS_NgachCongChuc", SqlDbType.Int, pNS_LuongInfo.IDNS_NgachCongChuc));
            colParam.Add(CreateParam("@BacLuong", SqlDbType.Int, pNS_LuongInfo.BacLuong));
            colParam.Add(CreateParam("@HeSoLuong", SqlDbType.Float, pNS_LuongInfo.HeSoLuong));
            colParam.Add(CreateParam("@PhanTramHuong", SqlDbType.Float, pNS_LuongInfo.PhanTramHuong));
            colParam.Add(CreateParam("@TuNgay", SqlDbType.DateTime, pNS_LuongInfo.TuNgay));
            colParam.Add(CreateParam("@DenNgay", SqlDbType.DateTime, pNS_LuongInfo.DenNgay));
            colParam.Add(CreateParamOut("@ID", SqlDbType.Int));

            return((int)RunProcedureOut("sp_NS_Luong_Add_InfoFull", colParam));
        }
 public frmNangBacChuyenNgach()
 {
     InitializeComponent();
     oBGiaoVien           = new cBNS_GiaoVien();
     pGiaoVienInfo        = new NS_GiaoVienInfo();
     pDonViInfo           = new NS_DonViInfo();
     oBSoQuyetDinh        = new cBNS_SoQuyetDinh();
     pSoQuyetDinhInfo     = new NS_SoQuyetDinhInfo();
     oBLuong              = new cBNS_Luong();
     pNS_LuongInfo        = new NS_LuongInfo();
     oBNS_NhomNgach       = new cBNS_NhomNgach();
     pNS_NhomNgachInfo    = new NS_NhomNgachInfo();
     dtNangBacChuyenNgach = new DataTable();
     cmbBacLuong_SelectedIndexChanged(null, null);
     CreateTable();
 }
Exemplo n.º 9
0
        public void Update(NS_LuongInfo pNS_LuongInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@IDNS_GiaoVien", SqlDbType.Int, pNS_LuongInfo.IDNS_GiaoVien));
            colParam.Add(CreateParam("@IDNS_SoQuyetDinh", SqlDbType.Int, pNS_LuongInfo.IDNS_SoQuyetDinh));
            colParam.Add(CreateParam("@CongViecDamNhiem", SqlDbType.NVarChar, pNS_LuongInfo.CongViecDamNhiem));
            colParam.Add(CreateParam("@IDNS_NgachCongChuc", SqlDbType.Int, pNS_LuongInfo.IDNS_NgachCongChuc));
            colParam.Add(CreateParam("@BacLuong", SqlDbType.Int, pNS_LuongInfo.BacLuong));
            colParam.Add(CreateParam("@HeSoLuong", SqlDbType.Float, pNS_LuongInfo.HeSoLuong));
            colParam.Add(CreateParam("@PhanTramHuong", SqlDbType.Float, pNS_LuongInfo.PhanTramHuong));
            colParam.Add(CreateParam("@TuNgay", SqlDbType.DateTime, pNS_LuongInfo.TuNgay));
            colParam.Add(CreateParam("@DenNgay", SqlDbType.DateTime, pNS_LuongInfo.DenNgay));
            colParam.Add(CreateParam("@NS_LuongID", SqlDbType.Int, pNS_LuongInfo.NS_LuongID));

            RunProcedure("sp_NS_Luong_Update", colParam);
        }
Exemplo n.º 10
0
 public frmLuong()
 {
     InitializeComponent();
     oBGiaoVien        = new cBNS_GiaoVien();
     pGiaoVienInfo     = new NS_GiaoVienInfo();
     pDonViInfo        = new NS_DonViInfo();
     oBSoQuyetDinh     = new cBNS_SoQuyetDinh();
     pSoQuyetDinhInfo  = new NS_SoQuyetDinhInfo();
     oBLuong           = new cBNS_Luong();
     pNS_LuongInfo     = new NS_LuongInfo();
     oBNS_NhomNgach    = new cBNS_NhomNgach();
     pNS_NhomNgachInfo = new NS_NhomNgachInfo();
     SetButton(false);
     btnThem.Enabled = true;
     SetControl(true);
     dtpDenNgay.Enabled = false;
     btnLuu.Enabled     = false;
     cmbBacLuong_SelectedIndexChanged(null, null);
 }
Exemplo n.º 11
0
 public void ToInfo(ref NS_LuongInfo pNS_LuongInfo, DataRow dr)
 {
     pNS_LuongInfo.NS_LuongID         = int.Parse(dr[pNS_LuongInfo.strNS_LuongID].ToString());
     pNS_LuongInfo.IDNS_GiaoVien      = int.Parse("0" + dr[pNS_LuongInfo.strIDNS_GiaoVien]);
     pNS_LuongInfo.IDNS_SoQuyetDinh   = int.Parse("0" + dr[pNS_LuongInfo.strIDNS_SoQuyetDinh]);
     pNS_LuongInfo.CongViecDamNhiem   = dr[pNS_LuongInfo.strCongViecDamNhiem].ToString();
     pNS_LuongInfo.IDNS_NgachCongChuc = int.Parse("0" + dr[pNS_LuongInfo.strIDNS_NgachCongChuc]);
     pNS_LuongInfo.BacLuong           = int.Parse("0" + dr[pNS_LuongInfo.strBacLuong]);
     pNS_LuongInfo.HeSoLuong          = double.Parse("0" + dr[pNS_LuongInfo.strHeSoLuong]);
     pNS_LuongInfo.PhanTramHuong      = double.Parse("0" + dr[pNS_LuongInfo.strPhanTramHuong]);
     if (dr[pNS_LuongInfo.strTuNgay].ToString() != "")
     {
         pNS_LuongInfo.TuNgay = DateTime.Parse(dr[pNS_LuongInfo.strTuNgay].ToString());
     }
     if (dr[pNS_LuongInfo.strDenNgay].ToString() != "")
     {
         pNS_LuongInfo.DenNgay = DateTime.Parse(dr[pNS_LuongInfo.strDenNgay].ToString());
     }
 }
Exemplo n.º 12
0
 public void Delete(NS_LuongInfo pNS_LuongInfo)
 {
     oDNS_Luong.Delete(pNS_LuongInfo);
     mErrorMessage = oDNS_Luong.ErrorMessages;
     mErrorNumber  = oDNS_Luong.ErrorNumber;
 }
Exemplo n.º 13
0
 public DataTable Get(NS_LuongInfo pNS_LuongInfo)
 {
     return(oDNS_Luong.Get(pNS_LuongInfo));
 }