예제 #1
0
        public static int SaveOnHire(EMS.Common.IEqpOnHire eqpOnHire)
        {
            string strExecution = "[admin].[uspSaveEqpOnHire]";
            int    result       = 0;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddCharParam("@OnOffHire", 1, eqpOnHire.OnOffHire);
                oDq.AddIntegerParam("@NVOCCID", eqpOnHire.NVOCCID);
                oDq.AddIntegerParam("@LeaseID", eqpOnHire.LeaseID);
                oDq.AddIntegerParam("@CompanyID", eqpOnHire.CompanyID);
                oDq.AddIntegerParam("@LocationID", eqpOnHire.LocationID);
                oDq.AddVarcharParam("@HireReference", 20, eqpOnHire.HireReference);
                oDq.AddDateTimeParam("@HireReferenceDate", eqpOnHire.HireReferenceDate);
                oDq.AddDateTimeParam("@ValidTill", eqpOnHire.ValidTill);
                oDq.AddBigIntegerParam("@ReturnedPortID", eqpOnHire.ReturnedPortID);
                oDq.AddVarcharParam("@Narration", 100, eqpOnHire.Narration);
                oDq.AddVarcharParam("@ReleaseRefNo", 100, eqpOnHire.ReleaseRefNo);
                oDq.AddDateTimeParam("@ReleaseRefDate", eqpOnHire.ReleaseRefDate);
                oDq.AddIntegerParam("@TEUs", eqpOnHire.TEUs);
                oDq.AddIntegerParam("@FEUs", eqpOnHire.FEUs);
                oDq.AddIntegerParam("@UserAdded", eqpOnHire.UserAdded);
                oDq.AddIntegerParam("@UserLastEdited", eqpOnHire.UserLastEdited);
                oDq.AddDateTimeParam("@AddedOn", DateTime.Now);
                oDq.AddDateTimeParam("@EditedOn", DateTime.Now);
                oDq.AddVarcharParam("@xml", int.MaxValue, eqpOnHire.LstEqpOnHireContainer.CreateFromEnumerable());
                oDq.AddIntegerParam("@return", 0, QueryParameterDirection.Output);
                oDq.RunActionQuery();
                result = Convert.ToInt32(oDq.GetParaValue("@return"));
            }

            return(result);
        }
예제 #2
0
 public int UpdateOnHire(EMS.Common.IEqpOnHire eqpOnHire)
 {
     return(EMS.DAL.OnHireDAL.UpdateOnHire(eqpOnHire));
 }
예제 #3
0
 public int SaveOnHire(EMS.Common.IEqpOnHire eqpOnHire)
 {
     return(EMS.DAL.OnHireDAL.SaveOnHire(eqpOnHire));
 }