public ActionResult DeleteById(int id) { List <ContactVM> contactVM = new List <ContactVM>(); contactVM = ContactBatchDB.DeleteContactByBatchId(id); return(View(contactVM)); }
public ActionResult GetFileById(int id) { List <ContactVM> contactVM = new List <ContactVM>(); contactVM = ContactBatchDB.GetContactByBatchId(id); return(View(contactVM)); }
// GET: ContactBatch public ActionResult Index() { List <ContactBatch> contactBatchDBs = new List <ContactBatch>(); contactBatchDBs = ContactBatchDB.GetAllBatches(); return(View(contactBatchDBs)); }
public ActionResult EditById(int id) { List <ContactVM> contactVM = new List <ContactVM>(); contactVM = ContactBatchDB.EditContactByBatchId(id); Session["BatchId"] = ContactBatchDB.EditContactByBatchId(id); return(View(contactVM)); }
public ActionResult UpdateByBatchId(ContactVM contactVM) { int batchID = 0; List <ContactVM> batchId = new List <ContactVM>(); batchId = (List <ContactVM>)Session["BatchId"]; foreach (ContactVM contactsBatch in batchId) { batchID = contactsBatch.BatchId; } //Session object List <ContactVM> contacts = new List <ContactVM>(); contacts = (List <ContactVM>)Session["ReUploadBatch"]; ContactBatchDB.UpdateContactByBatchId(contacts, batchID); return(View()); }
public ActionResult CreateContact() { //DateTime myDateTime = DateTime.Now; //string sqlformattedDate = myDateTime.ToString("yyyy-MM-dd hh:mm:ss.fff"); var batchName = getBatchName(); ContactBatch batch = new ContactBatch { BatchName = batchName, CreatedBy = "System", DateCreated = DateTime.Now //DateCreated = Convert.ToDateTime(sqlformattedDate) }; int batchId = ContactBatchDB.GetBatchID(batch); List <ContactVM> contacts = new List <ContactVM>(); contacts = (List <ContactVM>)Session["Upload"]; ContactDb.PostToDatabase(contacts, batchId); return(View(contacts)); }
public ActionResult DeletedBatchById(int id) { ContactBatchDB.DeleteFileByBatchId(id); return(View()); }
public ActionResult Index() { return(View(ContactBatchDB.GetAllBatches())); }