public bool updateSRVRegistration(string serialno, int party, int caseid) { try { SRVRegistration temp = new SRVRegistration(); SRVRegistration srv = new RegistrationDAOLinq().SearchSRVBySerialParty(serialno, party); temp.Requisitioned = "Loan Disbursed"; temp.LoanDisbursed = srv.LoanDisbursed; temp.RegistrationID = srv.RegistrationID; temp.SerialID = srv.SerialID; temp.SerialNo = srv.SerialNo; temp.PartyID = srv.PartyID; temp.BagLoan = srv.BagLoan; temp.CarryingLoan = srv.CarryingLoan; temp.Remarks = srv.Remarks; temp.CreatedBy = srv.CreatedBy; temp.CreatedDate = srv.CreatedDate; temp.ModifiedBy = srv.ModifiedBy; temp.ModifiedDate = DateTime.Now; temp.Bags = srv.Bags; temp.CaseID = caseid; return(new RegistrationManager().SaveRegistration(temp)); } catch (Exception ex) { return(false); } }
/// <summary> /// Method to save (add/edit) party object /// </summary> /// <param name="party"></param> /// <returns></returns> public bool SaveRegistration(SRVRegistration serial) { try { if (serial.RegistrationID == 0) { return(_RegistrationDAOLinq.Add(serial)); } else { return(_RegistrationDAOLinq.Edit(serial)); } //if (_RegistrationDAOLinq.Exists(serial)) //{ // return _RegistrationDAOLinq.Edit(serial, true); //} //else //{ // return _RegistrationDAOLinq.Add(serial); //} } catch (Exception ex) { return(false); } }
public bool DeleteRegistration(SRVRegistration serial) { try { if (serial.RegistrationID > 0) { return(_RegistrationDAOLinq.Delete(serial, true)); } else { return(false); } } catch (Exception ex) { return(false); } }
/// <summary> /// Method to save (add/edit) party object /// </summary> /// <param name="party"></param> /// <returns></returns> public bool SaveReport(SRVRegistration party) { try { if (party.RegistrationID == 0) { return(new RegistrationDAOLinq().Add(party)); } else { return(new RegistrationDAOLinq().Edit(party)); } // return new RegistrationDAOLinq().Add(party); } catch (Exception ex) { return(false); } }