public double GrossPay() { double Gross; Gross = Earn - deduct; lblnetsal.Text = Gross.ToString(); return(Gross); }
public string InsertSQL() { String sql = "insert into workorder (productorder,type,scheduledate,lenth,width," + "thickness,gross,done,undone,completedate,machinecode,worker,worth,remark,status,receivedate,grosswidth) " + "values ('{0}','{1}','{2}',{3},{4},{5},{6},{7},{8},'{9}','{10}','{11}',{12},'{13}',{14},'{15}',{16})"; return(String.Format(sql, ProductOrder, Type, ScheduleDate.ToString("yyyy-MM-dd"), Length.ToString(), Width.ToString(), Thickness.ToString(), Gross.ToString(), Done.ToString(), Undo.ToString(), CompleteDate.ToString("yyyy-MM-dd"), MachineCode, Worker, Worth.ToString(), Remark, Status.ToString(), ReceiveDate.ToString("yyyy-MM-dd HH:mm:ss"), GrossWidth.ToString())); }
public string UndateSQL() { String sql = "update workorder set productorder = '{0}',type = '{1}',scheduledate='{2}',lenth={3},width = {4}," + "thickness={5},gross={6},done={7},undone={8},completedate='{9}',machinecode='{10}',worker='{11}'," + "worth={12},remark='{13}',status={14} ,receivedate = '{15}',grosswidth = {16} where id = {17} "; return(String.Format(sql, ProductOrder, Type, ScheduleDate.ToString("yyyy-MM-dd"), Length.ToString(), Width.ToString(), Thickness.ToString(), Gross.ToString(), Done.ToString(), Undo.ToString(), CompleteDate.ToString("yyyy-MM-dd"), MachineCode, Worker, Worth.ToString(), Remark, Status.ToString(), ReceiveDate.ToString("yyyy-MM-dd HH:mm:ss"), GrossWidth.ToString(), id.ToString())); }
private void AddMovieForm_Load(object sender, EventArgs e) { tbName.Text = MovieName; tbRuntime.Text = Runtime == 0 ? "" : Runtime.ToString(); dtpReleaseDate.Value = ReleaseDate; tbBudget.Text = Budget == 0 ? "" : Budget.ToString(); tbGross.Text = Gross == 0 ? "" : Gross.ToString(); tbTagline.Text = Tagline; rtbPlotSummary.Text = PlotSummary; if (Poster.StartsWith("\\")) { Poster = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + Poster; } try { pbPoster.Image = Image.FromFile(Poster); } catch (FileNotFoundException ex) { pbPoster.Image = Image.FromFile(Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName + "\\Posters\\default.png"); } var genreItems = lvGenres.Items; foreach (var genre in Genres.ToList()) { foreach (var item in genreItems) { genre genreItem = (genre)(item as ListViewItem).Tag; if (genreItem.id == genre.id) { (item as ListViewItem).Checked = true; } } checkedGenres.Add(genre); } var languageItems = lvLanguages.Items; foreach (var language in Languages.ToList()) { foreach (var item in languageItems) { language languageItem = (language)(item as ListViewItem).Tag; if (languageItem.id == language.id) { (item as ListViewItem).Checked = true; } } checkedLanguages.Add(language); } var actorItems = lvActors.Items; foreach (var actor in MovieActors.ToList()) { foreach (var item in actorItems) { actor actorItem = (actor)(item as ListViewItem).Tag; if (actorItem.id == actor.id) { (item as ListViewItem).Checked = true; } } checkedActors.Add(actor); } var directorItems = lvDirectors.Items; foreach (var director in MovieDirectors.ToList()) { foreach (var item in directorItems) { director directorItem = (director)(item as ListViewItem).Tag; if (directorItem.id == director.id) { (item as ListViewItem).Checked = true; } } checkedDirectors.Add(director); } }
public override string ToString() { return(string.Format(Formatting, new string[] { SSN, Gross.ToString("C"), Tax.ToString("C") })); }
public override string ToString() { return($"{Title} ({Id}) made {Gross.ToString("C")}"); }