Example #1
0
        public async Task <IActionResult> GetPOQuoteView(long poQuoteId)
        {
            POQuoteModule invMod = new POQuoteModule();

            POQuoteView view = await invMod.POQuote.Query().GetViewById(poQuoteId);

            return(Ok(view));
        }
Example #2
0
        public async Task <IActionResult> DeletePOQuote([FromBody] POQuoteView view)
        {
            POQuoteModule invMod  = new POQuoteModule();
            Poquote       poQuote = await invMod.POQuote.Query().MapToEntity(view);

            invMod.POQuote.DeletePOQuote(poQuote).Apply();

            return(Ok(view));
        }
Example #3
0
        public async Task <IActionResult> UpdatePOQuote([FromBody] POQuoteView view)
        {
            POQuoteModule invMod = new POQuoteModule();

            Poquote poQuote = await invMod.POQuote.Query().MapToEntity(view);


            invMod.POQuote.UpdatePOQuote(poQuote).Apply();

            POQuoteView retView = await invMod.POQuote.Query().GetViewById(poQuote.PoquoteId);


            return(Ok(retView));
        }
Example #4
0
        public async Task <IActionResult> AddPOQuote([FromBody] POQuoteView view)
        {
            POQuoteModule invMod = new POQuoteModule();

            NextNumber nnPOQuote = await invMod.POQuote.Query().GetNextNumber();

            view.PoquoteNumber = nnPOQuote.NextNumberValue;

            Poquote poQuote = await invMod.POQuote.Query().MapToEntity(view);

            invMod.POQuote.AddPOQuote(poQuote).Apply();

            POQuoteView newView = await invMod.POQuote.Query().GetViewByNumber(view.PoquoteNumber);


            return(Ok(newView));
        }