Example #1
0
 public string SaveOrUpdateTicketSystem(TicketSystem TicketSystem)
 {
     try
     {
         if (TicketSystem.Id > 0)
         {
             PSF.SaveOrUpdate <TicketSystem>(TicketSystem);
         }
         else
         {
             string ticketNo = "ETicket-" + TicketSystem.Id;
             TicketSystem.TicketNo = ticketNo;
             PSF.Save <TicketSystem>(TicketSystem);
         }
         return(TicketSystem.TicketNo);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public bool SaveOrUpdateInvoiceOrders(long invoiceId, long[] OrderId)
 {
     try
     {
         bool retValue = false;
         if (invoiceId > 0 && OrderId.Length > 0)
         {
             foreach (long id in OrderId)
             {
                 PSF.SaveOrUpdate <InvoiceOrders>(new InvoiceOrders()
                 {
                     InvoiceId = invoiceId, OrderId = id, Status = "Gen Invoice", CreatedDate = DateTime.Now
                 });
             }
             retValue = true;
         }
         return(retValue);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public long CreateOrUpdateDocuments(Documents doc)
 {
     try
     {
         if (doc != null)
         {
             PSF.SaveOrUpdate <Documents>(doc);
         }
         else
         {
             throw new Exception("Documents is required and it cannot be null..");
         }
         return(doc.EntityRefId);
     }
     catch (Exception)
     {
         throw;
     }
 }
Example #4
0
 public long CreateOrUpdateUserAppRole(UserAppRole userapprole)
 {
     try
     {
         if (userapprole != null)
         {
             PSF.SaveOrUpdate <UserAppRole>(userapprole);
         }
         else
         {
             throw new Exception("userapprole is required and it cannot be null..");
         }
         return(userapprole.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }
 public long SaveOrUpdatePurchaseOrderInvocie(Inventory_PurchaseOrderInvoice purchaseOrderInvoice)
 {
     try
     {
         if (purchaseOrderInvoice != null)
         {
             PSF.SaveOrUpdate <Inventory_PurchaseOrderInvoice>(purchaseOrderInvoice);
         }
         else
         {
             throw new Exception("Purchase order is required and it cannot be null..");
         }
         return(purchaseOrderInvoice.POInvoiceId);
     }
     catch (Exception)
     {
         throw;
     }
 }
        public bool BulkCompleteInformationActivity(string Template, string userId, long[] ActivityId)
        {
            bool             retValue        = false;
            IList <Activity> CurrentActivity = PSF.GetListById <Activity>("Id", ActivityId);

            if (CurrentActivity != null && CurrentActivity.Count > 0 && CurrentActivity.First() != null)
            {
                foreach (Activity ac in CurrentActivity)
                {
                    ac.Completed = true;
                    ac.Available = false;
                    ac.Assigned  = false;
                    ac.Performer = userId;
                    PSF.SaveOrUpdate(ac);
                    ProcessInstance pi = PSF.Get <ProcessInstance>(ac.InstanceId);
                    pi.Status = "Completed";
                    PSF.SaveOrUpdate(pi);
                    retValue = true;
                }
            }
            return(retValue);
        }
 public long SaveOrUpdateMenuDetails(Menu mu)
 {
     try
     {
         if (mu != null)
         {
             PSF.SaveOrUpdate <Menu>(mu);
         }
         else
         {
             throw new Exception("Webtemplate is required and it cannot be null..");
         }
         return(mu.Id);
     }
     catch (Exception)
     {
         throw;
     }
 }