Exemplo n.º 1
0
 public frmLoaiCongViec()
 {
     InitializeComponent();
     oBLoaiCongViec    = new cBDM_LoaiCongViec();
     pLoaiCongViecInfo = new DM_LoaiCongViecInfo();
     panelTop.Visible  = false;
 }
Exemplo n.º 2
0
 public void ToInfo(ref DM_LoaiCongViecInfo pDM_LoaiCongViecInfo, DataRow dr)
 {
     pDM_LoaiCongViecInfo.DM_LoaiCongViecID = int.Parse(dr[pDM_LoaiCongViecInfo.strDM_LoaiCongViecID].ToString());
     pDM_LoaiCongViecInfo.TenLoaiCongViec   = dr[pDM_LoaiCongViecInfo.strTenLoaiCongViec].ToString();
     pDM_LoaiCongViecInfo.SoLuong           = double.Parse(dr[pDM_LoaiCongViecInfo.strSoLuong].ToString());
     pDM_LoaiCongViecInfo.DonVi             = dr[pDM_LoaiCongViecInfo.strDonVi].ToString();
     pDM_LoaiCongViecInfo.QuyChuan          = double.Parse(dr[pDM_LoaiCongViecInfo.strQuyChuan].ToString());
 }
Exemplo n.º 3
0
 public void ToDataRow(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo, ref DataRow dr)
 {
     dr[pDM_LoaiCongViecInfo.strDM_LoaiCongViecID] = pDM_LoaiCongViecInfo.DM_LoaiCongViecID;
     dr[pDM_LoaiCongViecInfo.strTenLoaiCongViec]   = pDM_LoaiCongViecInfo.TenLoaiCongViec;
     dr[pDM_LoaiCongViecInfo.strSoLuong]           = pDM_LoaiCongViecInfo.SoLuong;
     dr[pDM_LoaiCongViecInfo.strDonVi]             = pDM_LoaiCongViecInfo.DonVi;
     dr[pDM_LoaiCongViecInfo.strQuyChuan]          = pDM_LoaiCongViecInfo.QuyChuan;
 }
        public void Delete(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@DM_LoaiCongViecID", SqlDbType.Int, pDM_LoaiCongViecInfo.DM_LoaiCongViecID));

            RunProcedure("sp_DM_LoaiCongViec_Delete", colParam);
        }
        public DataTable Get(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@DM_LoaiCongViecID", SqlDbType.Int, pDM_LoaiCongViecInfo.DM_LoaiCongViecID));

            return(RunProcedureGet("sp_DM_LoaiCongViec_Get", colParam));
        }
Exemplo n.º 6
0
        public int Add(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            int ID = 0;

            ID            = oDDM_LoaiCongViec.Add(pDM_LoaiCongViecInfo);
            mErrorMessage = oDDM_LoaiCongViec.ErrorMessages;
            mErrorNumber  = oDDM_LoaiCongViec.ErrorNumber;
            return(ID);
        }
        public void Update(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@TenLoaiCongViec", SqlDbType.NVarChar, pDM_LoaiCongViecInfo.TenLoaiCongViec));
            colParam.Add(CreateParam("@SoLuong", SqlDbType.Float, pDM_LoaiCongViecInfo.SoLuong));
            colParam.Add(CreateParam("@DonVi", SqlDbType.NVarChar, pDM_LoaiCongViecInfo.DonVi));
            colParam.Add(CreateParam("@QuyChuan", SqlDbType.Float, pDM_LoaiCongViecInfo.QuyChuan));
            colParam.Add(CreateParam("@DM_LoaiCongViecID", SqlDbType.Int, pDM_LoaiCongViecInfo.DM_LoaiCongViecID));

            RunProcedure("sp_DM_LoaiCongViec_Update", colParam);
        }
        public int Add(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            ArrayList colParam = new ArrayList();

            colParam.Add(CreateParam("@TenLoaiCongViec", SqlDbType.NVarChar, pDM_LoaiCongViecInfo.TenLoaiCongViec));
            colParam.Add(CreateParam("@SoLuong", SqlDbType.Float, pDM_LoaiCongViecInfo.SoLuong));
            colParam.Add(CreateParam("@DonVi", SqlDbType.NVarChar, pDM_LoaiCongViecInfo.DonVi));
            colParam.Add(CreateParam("@QuyChuan", SqlDbType.Float, pDM_LoaiCongViecInfo.QuyChuan));
            colParam.Add(CreateParamOut("@ID", SqlDbType.Int));

            return((int)RunProcedureOut("sp_DM_LoaiCongViec_Add", colParam));
        }
Exemplo n.º 9
0
        public List <DM_LoaiCongViecInfo> GetList(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
        {
            List <DM_LoaiCongViecInfo> oDM_LoaiCongViecInfoList = new List <DM_LoaiCongViecInfo>();
            DataTable dtb = Get(pDM_LoaiCongViecInfo);

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

                    oDM_LoaiCongViecInfo.DM_LoaiCongViecID = int.Parse(dtb.Rows[i]["DM_LoaiCongViecID"].ToString());
                    oDM_LoaiCongViecInfo.TenLoaiCongViec   = dtb.Rows[i]["TenLoaiCongViec"].ToString();
                    oDM_LoaiCongViecInfo.SoLuong           = double.Parse(dtb.Rows[i]["SoLuong"].ToString());
                    oDM_LoaiCongViecInfo.DonVi             = dtb.Rows[i]["DonVi"].ToString();
                    oDM_LoaiCongViecInfo.QuyChuan          = double.Parse(dtb.Rows[i]["QuyChuan"].ToString());

                    oDM_LoaiCongViecInfoList.Add(oDM_LoaiCongViecInfo);
                }
            }
            return(oDM_LoaiCongViecInfoList);
        }
Exemplo n.º 10
0
 public void Delete(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
 {
     oDDM_LoaiCongViec.Delete(pDM_LoaiCongViecInfo);
     mErrorMessage = oDDM_LoaiCongViec.ErrorMessages;
     mErrorNumber  = oDDM_LoaiCongViec.ErrorNumber;
 }
Exemplo n.º 11
0
 public DataTable Get(DM_LoaiCongViecInfo pDM_LoaiCongViecInfo)
 {
     return(oDDM_LoaiCongViec.Get(pDM_LoaiCongViecInfo));
 }