Esempio n. 1
0
        public static int SaveSlot(EMS.Common.ISlot Slot, int isEdit)
        {
            string strExecution = "[exp].[prcAddEditSlot]";
            int    result       = 0;

            using (DbQuery oDq = new DbQuery(strExecution))
            {
                oDq.AddIntegerParam("@UserID", Slot.CreatedBy);
                oDq.AddIntegerParam("@isEdit", isEdit);
                oDq.AddIntegerParam("@fk_LineID", Slot.LineID);
                oDq.AddIntegerParam("@fk_CompanyID", Slot.CompanyID);
                oDq.AddIntegerParam("@fk_SlotOperatorID", Slot.SlotOperatorID);
                oDq.AddIntegerParam("@fk_POL", Slot.POLID);
                oDq.AddIntegerParam("@fk_POD", Slot.PODID);
                oDq.AddDateTimeParam("@EffDate", Slot.EffectDt);
                oDq.AddVarcharParam("@PODTerminal", 50, Slot.PODTerminal);
                oDq.AddIntegerParam("@UserLastEdited", Slot.ModifiedBy);
                oDq.AddDateTimeParam("@AddedOn", DateTime.Now);
                oDq.AddDateTimeParam("@EditedOn", DateTime.Now);
                //oDq.AddVarcharParam("@xml", int.MaxValue, Slot.LstSlotCost.CreateFromEnumerable());
                oDq.AddIntegerParam("@return", 0, QueryParameterDirection.Output);
                oDq.RunActionQuery();
                result = Convert.ToInt32(oDq.GetParaValue("@return"));
            }

            return(result);
        }
Esempio n. 2
0
 public int SaveSlot(EMS.Common.ISlot slot, int IsEdit)
 {
     return(EMS.DAL.SlotDAL.SaveSlot(slot, IsEdit));
 }