Ejemplo n.º 1
0
    public bool update(Supplier_Commodity entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@SupplierCommodityKey", entity.Id.ToString());
            DM.Load_SP_Parameters("@SupplierKey", entity.SupplierKey.ToString());
            DM.Load_SP_Parameters("@CommodityKey", entity.CommodityKey.ToString());

            result = DM.Execute_StoreProcedure("SupplierCommodity_Edit", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 2
0
    public bool take(long bomDetailKey, string user)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@BOMDetailKey", bomDetailKey.ToString());
            DM.Load_SP_Parameters("@AssignedTo", user);

            result = DM.Execute_StoreProcedure("TakeBOM", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 3
0
    public bool update(BOM entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@BOMHeaderKey", entity.Id.ToString());
            DM.Load_SP_Parameters("@SIFHeaderKey", entity.SifId.ToString());
            DM.Load_SP_Parameters("@TopPartNumber", entity.TopPartNumber);
            DM.Load_SP_Parameters("@PartDescription", entity.PartDescription);
            DM.Load_SP_Parameters("@Revision", entity.Revision);
            DM.Load_SP_Parameters("@AnnualVolume", entity.AnnualVolume.ToString());
            DM.Load_SP_Parameters("@sys_active", true.ToString());

            result = DM.Execute_StoreProcedure("BOMHeader_EditBOM", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }
        return(result);
    }
Ejemplo n.º 4
0
    public bool create(Token entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@Token", entity.TokenNumber);
            DM.Load_SP_Parameters("@Subject", entity.Subject);
            DM.Load_SP_Parameters("@SubjectKey", entity.SubjectKey.ToString());
            DM.Load_SP_Parameters("@DeadDate", entity.DeadDate.ToString("G"));
            DM.Load_SP_Parameters("@Acknowledgement", entity.Acnkowledgment);

            result = DM.Execute_StoreProcedure("TokenMaster_NewToken", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 5
0
    public bool create(Item entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@PartNumber", entity.PartNumber);
            DM.Load_SP_Parameters("@PartDescription", entity.Description);
            DM.Load_SP_Parameters("@UM", entity.Um);
            DM.Load_SP_Parameters("@PartMaterial", entity.Material);
            DM.Load_SP_Parameters("@Cost", entity.Cost.ToString());
            DM.Load_SP_Parameters("@CapsonicPN", entity.CapsonicPN);
            DM.Load_SP_Parameters("@CustomerPN", entity.CustomerPN);
            DM.Load_SP_Parameters("@ManufacturePN", entity.ManufacturePN);
            DM.Load_SP_Parameters("@SupplierPN", entity.SupplierPN);
            DM.Load_SP_Parameters("@CommCode", entity.CommCode);
            //DM.Load_SP_Parameters("@EAU", entity.EAU.ToString());

            result = DM.Execute_StoreProcedure("ItemMaster_NewItem", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 6
0
    public bool update(Customer entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@CustomerKey", entity.Id.ToString());
            DM.Load_SP_Parameters("@CustomerName", entity.CustomerName);

            result = DM.Execute_StoreProcedure("CustomerMaster_EditCustomer", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 7
0
    public bool create(Commodity entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@CommodityCode", entity.CommodityCode);
            DM.Load_SP_Parameters("@Commodity", entity.CommidityName);

            result = DM.Execute_StoreProcedure("CommodityMaster_NewCommodity", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 8
0
    public bool update(BOMDetail entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@BOMDetailKey", entity.Id.ToString());
            DM.Load_SP_Parameters("@BOMHeaderKey", entity.BomHeaderKey.ToString());
            DM.Load_SP_Parameters("@ItemMasterKey", entity.ItemMasterkey.ToString());
            DM.Load_SP_Parameters("@Qty", entity.Qty.ToString());
            DM.Load_SP_Parameters("@Cost", entity.Cost.ToString());
            DM.Load_SP_Parameters("@Status", entity.Status);
            DM.Load_SP_Parameters("@Description", entity.Description);
            DM.Load_SP_Parameters("@LinePosition", entity.LinePosition);
            DM.Load_SP_Parameters("@SalesStatus", entity.SalesStatus);
            DM.Load_SP_Parameters("@User", entity.User);
            DM.Load_SP_Parameters("@PurchasingStatus", entity.PurchasingStatus);
            DM.Load_SP_Parameters("@DirectedBuy", entity.DirectedBuy.ToString());
            DM.Load_SP_Parameters("@Material", entity.Material);
            DM.Load_SP_Parameters("@Um", entity.Um);
            DM.Load_SP_Parameters("@VendorQuoteEst", entity.VendorQuoteEst);
            DM.Load_SP_Parameters("@SalesComments", entity.SalesComments);
            DM.Load_SP_Parameters("@PurchasingComments", entity.PurchasingComments);
            DM.Load_SP_Parameters("@CapComAssm", entity.CapComAssm);
            DM.Load_SP_Parameters("@CapsonicPN", entity.CapsonicPN);
            DM.Load_SP_Parameters("@CustomerPN", entity.CustomerPN);
            DM.Load_SP_Parameters("@ManufacturePN", entity.ManufacturePN);
            DM.Load_SP_Parameters("@SupplierPN", entity.SupplierPN);
            DM.Load_SP_Parameters("@CommCode", entity.CommCode);
            DM.Load_SP_Parameters("@sys_active", true.ToString());
            DM.Load_SP_Parameters("@Sequence", entity.Sequence.ToString());
            DM.Load_SP_Parameters("@AttachmentsFolder", entity.AttachmentsFolder);

            result = DM.Execute_StoreProcedure("BOMDetail_EditDetail", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 9
0
    public bool update(Supplier entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@SupplierKey", entity.Id.ToString());
            DM.Load_SP_Parameters("@SupplierName", entity.SupplierName);
            DM.Load_SP_Parameters("@ContactName", entity.ContactName);
            DM.Load_SP_Parameters("@ContactPhoneNumber", entity.ContactPhone);
            DM.Load_SP_Parameters("@ContactEmail", entity.ContactEmail);
            DM.Load_SP_Parameters("@ManufacturingLocation", entity.ManufacturingLocation);
            DM.Load_SP_Parameters("@ShipLocation", entity.ShipLocation);
            DM.Load_SP_Parameters("@QuotedCurrency", entity.QuotedCurrency);
            DM.Load_SP_Parameters("@Capabilities", entity.Capabilities);
            DM.Load_SP_Parameters("@Comments", entity.Comments);
            DM.Load_SP_Parameters("@Visible", entity.Visible.ToString());
            DM.Load_SP_Parameters("@Commodity", entity.Commodity);
            DM.Load_SP_Parameters("@ContactCellPhoneNumber", entity.ContactCellPhone);
            DM.Load_SP_Parameters("@sys_active", true.ToString());

            result = DM.Execute_StoreProcedure("SupplierMaster_EditSupplier", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }
Ejemplo n.º 10
0
    public bool create(MarketSector entity)
    {
        ErrorOccur = false;
        bool result = false;

        DM = connectionManager.getDataManager();
        try
        {
            DM.Load_SP_Parameters("@Name", entity.Name);

            result = DM.Execute_StoreProcedure("MarketSector_NewMarket", true);

            ErrorOccur   = DM.ErrorOccur;
            ErrorMessage = DM.Error_Mjs;
        }
        catch (Exception e)
        {
            ErrorOccur   = true;
            ErrorMessage = e.Message;
            return(false);
        }

        return(result);
    }