public ActionResult BankCardUpdate(VM_BankCard card) { card.UserID = CurrentUser.UserID; card.AdditionalInfo = card.CardNumber; if (_DL.Cards.Get.ByID((int)card.CardID) == null) { throw new CardNotFoundException(); } return(GetJson(_DL.Cards.Update.UpdateCard(card))); }
public static long AddCard(VM_BankCard card) { using (var exodusDB = new exodusEntities()) { var Result = new ObjectParameter("Result", 0); // var cardID = exodusDB.stp_CreditCard_Add( userID: card.UserID, cardTypeID: (long)card.TypeID, bankID: card.BankID, cardNumber: card.CardNumber, cardValidTill: card.CardValidTill, cardAdditionalInfo: card.AdditionalInfo, result: Result ); return(Convert.ToInt64(Result.Value) == 0 ? cardID : -1); } }
public static int UpdateCard(VM_BankCard card) { using (var exodusDB = new exodusEntities()) { var Result = new ObjectParameter("Result", 0); exodusDB.stp_CreditCard_Update( creditCardID: card.CardID, cardTypeID: (long)card.TypeID, bankID: card.BankID, cardNumber: card.CardNumber, cardValidTill: card.CardValidTill, cardAdditionalInfo: card.AdditionalInfo, result: Result ); return(Convert.ToInt32(Result.Value)); } }
public ActionResult BankCardAdd(VM_BankCard card) { card.UserID = CurrentUser.UserID; card.AdditionalInfo = card.CardNumber; return(GetJson(_DL.Cards.Add.AddCard(card))); }