Пример #1
0
        public static int AddEditEquipEstimate(int userID, bool isEdit, IEqpRepairing ieqp)
        {
            int result = 0;

            using (DbQuery dq = new DbQuery("prcAddEditEquipEstimate"))
            {
                dq.AddIntegerParam("@pk_RepairID", ieqp.pk_RepairID);
                dq.AddIntegerParam("@LocationId", ieqp.locId);
                dq.AddDecimalParam("@RepMaterialEst", 12, 2, ieqp.RepMaterialEst);
                dq.AddDecimalParam("@RepMaterialAppr", 12, 2, ieqp.RepMaterialAppr);
                dq.AddDecimalParam("@RepMaterialBilled", 12, 2, ieqp.RepMaterialBilled);
                dq.AddDecimalParam("@RepLabourEst", 12, 2, ieqp.RepLabourEst);
                dq.AddDecimalParam("@RepLabourBilled", 12, 2, ieqp.RepLabourBilled);
                dq.AddDecimalParam("@RepLabourAppr", 12, 2, ieqp.RepLabourAppr);
                dq.AddDateTimeParam("@TransactionDate", ieqp.TransactionDate);
                dq.AddVarcharParam("ContainerNo", 11, ieqp.ContainerNo);
                dq.AddVarcharParam("@EstimateReference", 100, ieqp.EstimateReference);
                dq.AddIntegerParam("@fk_NVOCCID", ieqp.NVOCCId);
                dq.AddBooleanParam("@OnHold", ieqp.onHold);
                dq.AddDateTimeParam("@Releasedon", ieqp.RealeasedOn);
                dq.AddBooleanParam("@Damaged", ieqp.Damaged);
                dq.AddDateTimeParam("@StockReturnDate", ieqp.StockReturnDate);
                dq.AddVarcharParam("@Reason", 100, ieqp.Reason);
                dq.AddIntegerParam("@fk_UserApproved", ieqp.fk_UserApproved);
                dq.AddIntegerParam("@userId", userID);
                dq.AddBooleanParam("@isEdit", isEdit);
                result = dq.RunActionQuery();
            }

            return(result);
        }
Пример #2
0
        public static DataTable  GetEqpRepair(int userId, IEqpRepairing ieqp)//List<IEqpRepairing>
        {
            List <IEqpRepairing> lstEqpRepair = new List <IEqpRepairing>();
            DataTable            dt           = new DataTable();
            string proc = "prcGetEqpRepair";

            using (DbQuery oDq = new DbQuery(proc))
            {
                oDq.AddIntegerParam("@pk_RepairID", ieqp.pk_RepairID);
                oDq.AddVarcharParam("@CntrNo", 11, ieqp.ContainerNo);
                oDq.AddVarcharParam("@Location", 50, ieqp.Location);
                dt = oDq.GetTable();
                ////DataTableReader dr = oDq.GetTableReader();
                ////while (dr.Read())
                ////{
                ////    EquipmentRepairEntity erapair = new EquipmentRepairEntity(dr);
                ////    dt.Rows.Add(dr);
                ////    lstEqpRepair.Add(erapair);
                ////}
                ////dr.Close();
            }
            return(dt);// lstEqpRepair;
        }
Пример #3
0
 public static int AddEditEquipEstimate(int userId, bool isEdit, IEqpRepairing ieqp)
 {
     return(EquipmentDAL.AddEditEquipEstimate(userId, isEdit, ieqp));
 }
Пример #4
0
 public static DataTable GetEqpRepair(int UserId, IEqpRepairing ieqp)//List<IEqpRepairing>
 {
     return(EquipmentDAL.GetEqpRepair(UserId, ieqp));
 }