예제 #1
0
        public string InsertFaxRequestAuditRecord(FaxRequestQueryModel model)
        {
            string returnVal = "failure";

            tblFaxRequestMaster_AUDIT myFaxRequestMaster_AUDIT = new tblFaxRequestMaster_AUDIT();

            myFaxRequestMaster_AUDIT.FaxRequestID      = model.FaxRequestID;
            myFaxRequestMaster_AUDIT.ClientID          = model.ClientID;
            myFaxRequestMaster_AUDIT.Fax_File_Location = model.Fax_File_Location;
            myFaxRequestMaster_AUDIT.Date_Requested    = model.Date_Requested;
            myFaxRequestMaster_AUDIT.Date_Last_Sent    = DateTime.Now;
            myFaxRequestMaster_AUDIT.Fax_Status        = model.Fax_Status;

            try
            {
                DataContext.tblFaxRequestMaster_AUDIT.Add(myFaxRequestMaster_AUDIT);
                DataContext.SaveChanges();
                returnVal = "success";
            }
            catch (Exception ex)
            {
                returnVal = ex.InnerException.ToString();
            }

            return(returnVal);
        }
예제 #2
0
        /*
         * public Boolean UpdateMemberImageInfo(double imageMB, int contactID, string updateType)
         * {
         *  Boolean returnValue = false;
         *
         *  try
         *  {
         *
         *      var videoInfo = (from m in DataContext.Members
         *                       where m.ContactID == contactID
         *                       select m).SingleOrDefault();
         *
         *      if (videoInfo != null)
         *      {
         *
         *          if (updateType == "ADD")
         *          {
         *              videoInfo.TotalFiles = videoInfo.TotalFiles + 1;
         *              videoInfo.TotalFileMB = videoInfo.TotalFileMB + imageMB;
         *          }
         *
         *          if (updateType == "REMOVE")
         *          {
         *              videoInfo.TotalFiles = videoInfo.TotalFiles - 1;
         *              videoInfo.TotalFileMB = videoInfo.TotalFileMB - imageMB;
         *          }
         *
         *          DataContext.SaveChanges();
         *
         *      }
         *      else
         *      {
         *          returnValue = false;
         *      }
         *  }
         *  catch (Exception e)
         *  {
         *      returnValue = false;
         *      throw e;
         *  }
         *
         *  return returnValue;
         *
         * }
         *
         *
         *
         *
         * public Boolean UpdateMembershipStatus(int contactID)
         * {
         *  Boolean returnValue = false;
         *
         *  try
         *  {
         *
         *      string mySQL = "";
         *
         *      mySQL = "UPDATE dbo.Member SET MembershipStatus = 'EXPIRED' WHERE ContactID = " + contactID;
         *      DataContext.ExecuteStoreCommand(mySQL);
         *      DataContext.SaveChanges();
         *
         *  }
         *  catch (Exception e)
         *  {
         *      returnValue = false;
         *      throw e;
         *  }
         *
         *  return returnValue;
         * }
         */


        #endregion

        #region [ DELETE ]


        public string DeleteFaxRequest(FaxRequestQueryModel model)
        {
            string returnVal = "failure";

            try
            {
                DataContext.lsp_DeleteFaxRequest(model.FaxRequestID);
                DataContext.SaveChanges();
                returnVal = "success";
            }
            catch (Exception ex)
            {
                returnVal = ex.InnerException.ToString();
            }


            return(returnVal);
        }