コード例 #1
0
        public ActionResult DeleteById(int id)
        {
            List <ContactVM> contactVM = new List <ContactVM>();

            contactVM = ContactBatchDB.DeleteContactByBatchId(id);
            return(View(contactVM));
        }
コード例 #2
0
        public ActionResult GetFileById(int id)
        {
            List <ContactVM> contactVM = new List <ContactVM>();

            contactVM = ContactBatchDB.GetContactByBatchId(id);
            return(View(contactVM));
        }
コード例 #3
0
        // GET: ContactBatch
        public ActionResult Index()
        {
            List <ContactBatch> contactBatchDBs = new List <ContactBatch>();

            contactBatchDBs = ContactBatchDB.GetAllBatches();
            return(View(contactBatchDBs));
        }
コード例 #4
0
        public ActionResult EditById(int id)
        {
            List <ContactVM> contactVM = new List <ContactVM>();

            contactVM          = ContactBatchDB.EditContactByBatchId(id);
            Session["BatchId"] = ContactBatchDB.EditContactByBatchId(id);
            return(View(contactVM));
        }
コード例 #5
0
        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());
        }
コード例 #6
0
        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));
        }
コード例 #7
0
 public ActionResult DeletedBatchById(int id)
 {
     ContactBatchDB.DeleteFileByBatchId(id);
     return(View());
 }
コード例 #8
0
 public ActionResult Index()
 {
     return(View(ContactBatchDB.GetAllBatches()));
 }