Ejemplo n.º 1
0
 public void ToInfo(ref NS_NgachCongChucInfo pNS_NgachCongChucInfo, DataRow dr)
 {
     pNS_NgachCongChucInfo.NS_NgachCongChucID = int.Parse(dr[pNS_NgachCongChucInfo.strNS_NgachCongChucID].ToString());
     pNS_NgachCongChucInfo.MaNgachCongChuc    = dr[pNS_NgachCongChucInfo.strMaNgachCongChuc].ToString();
     pNS_NgachCongChucInfo.TenNgachCongChuc   = dr[pNS_NgachCongChucInfo.strTenNgachCongChuc].ToString();
     pNS_NgachCongChucInfo.IDNS_NhomNgach     = int.Parse("0" + dr[pNS_NgachCongChucInfo.strIDNS_NhomNgach]);
 }
Ejemplo n.º 2
0
 public void ToDataRow(NS_NgachCongChucInfo pNS_NgachCongChucInfo, ref DataRow dr)
 {
     dr[pNS_NgachCongChucInfo.strNS_NgachCongChucID] = pNS_NgachCongChucInfo.NS_NgachCongChucID;
     dr[pNS_NgachCongChucInfo.strMaNgachCongChuc]    = pNS_NgachCongChucInfo.MaNgachCongChuc;
     dr[pNS_NgachCongChucInfo.strTenNgachCongChuc]   = pNS_NgachCongChucInfo.TenNgachCongChuc;
     dr[pNS_NgachCongChucInfo.strIDNS_NhomNgach]     = pNS_NgachCongChucInfo.IDNS_NhomNgach;
 }
        public void Delete(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_NgachCongChucID", SqlDbType.Int, pNS_NgachCongChucInfo.NS_NgachCongChucID));

            RunProcedure("sp_NS_NgachCongChuc_Delete", colParam);
        }
        public DataTable Get(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@NS_NgachCongChucID", SqlDbType.Int, pNS_NgachCongChucInfo.NS_NgachCongChucID));

            return(RunProcedureGet("sp_NS_NgachCongChuc_Get", colParam));
        }
Ejemplo n.º 5
0
 public frmDM_NgachCongChuc(frmLuong _frmLuong, frmNangBacChuyenNgach _frmNangBacChuyenNgach)
 {
     InitializeComponent();
     oBNS_NgachCongChuc    = new cBNS_NgachCongChuc();
     pNS_NgachCongChucInfo = new NS_NgachCongChucInfo();
     SetControl(false);
     ofrmLuong = _frmLuong;
     ofrmNangBacChuyenNgach = _frmNangBacChuyenNgach;
 }
Ejemplo n.º 6
0
        public int Add(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            int ID = 0;

            ID            = oDNS_NgachCongChuc.Add(pNS_NgachCongChucInfo);
            mErrorMessage = oDNS_NgachCongChuc.ErrorMessages;
            mErrorNumber  = oDNS_NgachCongChuc.ErrorNumber;
            return(ID);
        }
        public void Update(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@MaNgachCongChuc", SqlDbType.NVarChar, pNS_NgachCongChucInfo.MaNgachCongChuc));
            colParam.Add(CreateParam("@TenNgachCongChuc", SqlDbType.NVarChar, pNS_NgachCongChucInfo.TenNgachCongChuc));
            colParam.Add(CreateParam("@IDNS_NhomNgach", SqlDbType.Int, pNS_NgachCongChucInfo.IDNS_NhomNgach));
            colParam.Add(CreateParam("@NS_NgachCongChucID", SqlDbType.Int, pNS_NgachCongChucInfo.NS_NgachCongChucID));

            RunProcedure("sp_NS_NgachCongChuc_Update", colParam);
        }
        public int Add(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@MaNgachCongChuc", SqlDbType.NVarChar, pNS_NgachCongChucInfo.MaNgachCongChuc));
            colParam.Add(CreateParam("@TenNgachCongChuc", SqlDbType.NVarChar, pNS_NgachCongChucInfo.TenNgachCongChuc));
            colParam.Add(CreateParam("@IDNS_NhomNgach", SqlDbType.Int, pNS_NgachCongChucInfo.IDNS_NhomNgach));
            colParam.Add(CreateParamOut("@ID", SqlDbType.Int));

            return((int)RunProcedureOut("sp_NS_NgachCongChuc_Add", colParam));
        }
Ejemplo n.º 9
0
        public List <NS_NgachCongChucInfo> GetList(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
        {
            List <NS_NgachCongChucInfo> oNS_NgachCongChucInfoList = new List <NS_NgachCongChucInfo>();
            DataTable dtb = Get(pNS_NgachCongChucInfo);

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

                    oNS_NgachCongChucInfo.NS_NgachCongChucID = int.Parse(dtb.Rows[i]["NS_NgachCongChucID"].ToString());
                    oNS_NgachCongChucInfo.MaNgachCongChuc    = dtb.Rows[i]["MaNgachCongChuc"].ToString();
                    oNS_NgachCongChucInfo.TenNgachCongChuc   = dtb.Rows[i]["TenNgachCongChuc"].ToString();
                    oNS_NgachCongChucInfo.IDNS_NhomNgach     = int.Parse(dtb.Rows[i]["IDNS_NhomNgach"].ToString());

                    oNS_NgachCongChucInfoList.Add(oNS_NgachCongChucInfo);
                }
            }
            return(oNS_NgachCongChucInfoList);
        }
Ejemplo n.º 10
0
 public void Delete(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
 {
     oDNS_NgachCongChuc.Delete(pNS_NgachCongChucInfo);
     mErrorMessage = oDNS_NgachCongChuc.ErrorMessages;
     mErrorNumber  = oDNS_NgachCongChuc.ErrorNumber;
 }
Ejemplo n.º 11
0
 public DataTable Get(NS_NgachCongChucInfo pNS_NgachCongChucInfo)
 {
     return(oDNS_NgachCongChuc.Get(pNS_NgachCongChucInfo));
 }