private void addMovieButton_Click(object sender, EventArgs e) { Thread t1 = new Thread(new ThreadStart(() => { process = new ProcessingForm(); process.ShowDialog(); })); Thread t2 = new Thread(new ThreadStart(() => { if (fileName.Length == 0 && folderPath.Length == 0) { MessageBox.Show("Please make sure you select a file OR a folder path"); return; } else if (fileName.Length > 0 && folderPath.Length == 0) { string[] split = fileName.Split('\\'); int index = split[split.Length - 1].LastIndexOf('.'); string sub = split[split.Length - 1].Substring(0, index); CreateMovie.createMovie(sub, movieList); } else if (fileName.Length == 0 && folderPath.Length > 0) { List <string> movies = new List <string>(); ProcessDirectory.processDirectory(folderPath, movies); foreach (string file in movies) { CreateMovie.createMovie(file, movieList); } } else { CreateMovie.createMovie(fileName, movieList); } paused = false; })); t1.Start(); t2.Start(); while (paused == true) { } Invoke(new Action(() => { process.timer.Stop(); process.timer.Enabled = false; process.Dispose(); })); t1.Abort(); t2.Abort(); /** * * save movie list to xml * **/ Dispose(); }
public async Task <ActionResult> Create([Bind(Include = "Formid,Preformid,OfferLetterFee,AppliedDate,RecivedDate,ProcessingFee,ProcessAlertDate,CollegeFee,CollegeAlertDate,GICFee,GICAlertDate,EmedicalFee,AppointmentDate,EmbassyFee,EmbassyAlertDate,TrackingId")] ProcessingForm processingForm) { if (ModelState.IsValid) { var pf = db.ProcessingForms.FirstOrDefault(x => x.Formid == processingForm.Formid); if (pf != null) { // ViewBag.message = "Yes"; // this.SetNotification("You Already Filled A Form. You Can Only Edit This Form . Go to Edit page And Edit", NotificationEnumeration.Warning); TempData["Warning"] = "You Already Filled A Form. You Can Only Edit This Form . Go to Edit page And Edit"; return(View(pf)); } else { db.ProcessingForms.Add(processingForm); await db.SaveChangesAsync(); // this.SetNotification("Your File Created Successfully", NotificationEnumeration.Warning); TempData["Sucess"] = "Your File Created Successfully"; return(RedirectToAction("Index")); } } ViewBag.Preformid = new SelectList(db.PreForms, "Preformid", "StudentName", processingForm.Preformid); return(View(processingForm)); }
public async Task <ActionResult> DeleteConfirmed(int id) { ProcessingForm processingForm = await db.ProcessingForms.FindAsync(id); db.ProcessingForms.Remove(processingForm); await db.SaveChangesAsync(); return(RedirectToAction("Index")); }
// GET: ProcessingForms/Details/5 public async Task <ActionResult> Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessingForm processingForm = await db.ProcessingForms.FindAsync(id); if (processingForm == null) { return(HttpNotFound()); } return(View(processingForm)); }
public async Task <ActionResult> Edit([Bind(Include = "id,OfferLetterFee,AppliedDate,RecivedDate,ProcessingFee,ProcessAlertDate,CollegeFee,CollegeAlertDate,GICFee,GICAlertDate,EmedicalFee,AppointmentDate,EmbassyFee,EmbassyAlertDate,TrackingId,Studentid")] ProcessingForm processingForm) { if (ModelState.IsValid) { processingForm.Studentid = student; db.Entry(processingForm).State = EntityState.Modified; await db.SaveChangesAsync(); this.SetNotification("Your Fees Form Edit Sucessfully.", NotificationEnumeration.Success); return(RedirectToAction("Index")); } return(View(processingForm)); }
public async Task <ActionResult> Edit([Bind(Include = "Formid,Preformid,OfferLetterFee,AppliedDate,RecivedDate,ProcessingFee,ProcessAlertDate,CollegeFee,CollegeAlertDate,GICFee,GICAlertDate,EmedicalFee,AppointmentDate,EmbassyFee,EmbassyAlertDate,TrackingId")] ProcessingForm processingForm) { if (ModelState.IsValid) { db.Entry(processingForm).State = EntityState.Modified; await db.SaveChangesAsync(); // this.SetNotification("Your Fees Form Edit Sucessfully.", NotificationEnumeration.Success); TempData["Sucess"] = "Your Fees Form Edit Sucessfully."; return(RedirectToAction("Index")); } ViewBag.Preformid = new SelectList(db.PreForms, "Preformid", "StudentName", processingForm.Preformid); return(View(processingForm)); }
private void ReLoadTestsQuestionSets() { testsQuestionSets = new TestQuestionSetSet(); ProcessingForm f = new ProcessingForm(); f.Caption = "Opening Database"; try { int nOfOp = 5; int op = 1; f.Operation = "Connecting to " + Name + "..."; f.Show(); f.Refresh(); if (!opened) { Connect(); } f.Progress = (op++ *100) / nOfOp; //2 f.Operation = "Loading Tests..."; LoadTests(); f.Progress = (op++ *100) / nOfOp; //3 f.Operation = "Loading Question Sets..."; LoadQuestionSets(); f.Progress = (op++ *100) / nOfOp; //4 f.Operation = "Loading Content of the Tests..."; LoadTestContents(); f.Progress = (op++ *100) / nOfOp; //5 f.Operation = "Building the Tree..."; CreateSubElements(); OnStructureChangedInternally(); f.Progress = (op++ *100) / nOfOp; } finally { f.Close(); } }
public async Task <ActionResult> Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ProcessingForm processingForm = await db.ProcessingForms.FindAsync(id); if (processingForm == null) { return(HttpNotFound()); } ViewBag.Preformid = new SelectList(db.PreForms, "Preformid", "StudentName", processingForm.Preformid); return(View(processingForm)); }
/// <summary> /// /// </summary> /// <param name="owner"></param> /// <param name="tip"></param> /// <param name="showTip"></param> /// <param name="showPercent"></param> /// <param name="max"></param> /// <param name="min"></param> /// <param name="style"></param> /// <returns></returns> public static ProgressBarOperator ShowProgress(this BaseForm owner, string tip, bool showTip, bool showPercent, int max, int min, ProgressBarStyle style) { ProcessingForm progressBar = owner != null?owner.GetProgressBarIns() : new ProcessingForm(null); progressBar.TipText = tip; progressBar.ShowTipText = showTip; progressBar.ShowPercentage = showPercent; progressBar.Max = max; progressBar.Min = min; progressBar.ProgressStyle = style; progressBar.Visible = true; progressBar.BringToFront(); return(new ProgressBarOperator(progressBar)); }
public ActionResult SMS(int id, Helper help, string Message, int status) { PreForm pp = db.PreForms.Where(x => x.Preformid == id).First(); ProcessingForm pf = db.ProcessingForms.Where(x => x.Preformid == id).First(); OfficeDetail of = db.OfficeDetails.FirstOrDefault(); if (status == 1) { // processing fee sms output = help.smssetting(pp.ContactNo, "Dear " + pp.StudentName + ". Your Processing Fees is:" + pf.ProcessingFee + " and your Due Date Is : " + pf.ProcessAlertDate + " Thanks and Regards " + of.CompanyName + ""); } else if (status == 2) { // college fee alert output = help.smssetting(pp.ContactNo, "Dear " + pp.StudentName + ". Your College Fees is:" + pf.CollegeFee + " and your Due Date Is : " + pf.CollegeAlertDate + " Thanks and Regards " + of.CompanyName + ""); } else if (status == 3) { // GIC fee alert output = help.smssetting(pp.ContactNo, "Dear " + pp.StudentName + ". Your GIC Fees is:" + pf.GICFee + " and your Due Date Is : " + pf.GICAlertDate + " Thanks and Regards " + of.CompanyName + ""); } else if (status == 3) { // Embassy fee alert output = help.smssetting(pp.ContactNo, "Dear " + pp.StudentName + ". Your Embassy Fees is:" + pf.EmbassyFee + " and your Due Date Is : " + pf.EmbassyAlertDate + " Thanks and Regards " + of.CompanyName + ""); } if (output == "Done") { this.SetNotification("Your Alert Message Send Sucessfully To " + pp.StudentName + "", NotificationEnumeration.Success); } else if (output == "SMS Not Activated") { this.SetNotification("SMS Sending Failed", NotificationEnumeration.Warning); } else { this.SetNotification("Message Not Send !", NotificationEnumeration.Error); } return(RedirectToAction("Index")); }
public async Task <ActionResult> Create([Bind(Include = "id,OfferLetterFee,AppliedDate,RecivedDate,ProcessingFee,ProcessAlertDate,CollegeFee,CollegeAlertDate,GICFee,GICAlertDate,EmedicalFee,AppointmentDate,EmbassyFee,EmbassyAlertDate,TrackingId,Studentid")] ProcessingForm processingForm, string student) { if (ModelState.IsValid) { var pf = db.ProcessingForms.FirstOrDefault(x => x.Studentid == student); if (pf != null) { ViewBag.message = "Yes"; this.SetNotification("You Already Filled A Form. You Can Only Edit This Form . Go to View page And Edit", NotificationEnumeration.Warning); return(View(pf)); } else { processingForm.Studentid = student;; db.ProcessingForms.Add(processingForm); await db.SaveChangesAsync(); this.SetNotification("Your File Created Successfully", NotificationEnumeration.Warning); return(RedirectToAction("Create")); } } return(View(processingForm)); }