Professional Documents
Culture Documents
Purino EA5 mONGOdb
Purino EA5 mONGOdb
Purino
BIT34
using System;
using System.Windows.Forms;
using MongoDB.Driver;
using MongoDB.Bson;
namespace EA5_Purino
{
public partial class Form1 : Form
{
private const double DailyWages = 580;
private const double SSS = 500;
private const double Pagibig = 250;
private const double OTPayExtraHour = 150.00;
try
{
lbllname.Text = lastName;
lblfname.Text = firstName;
lblmiddleinitial.Text = middleInitial;
lblempnum.Text = employeeId;
txtempid.Text = employeeId;
};
if (existingEmployee != null)
{
MessageBox.Show("Employee already exists in the database.");
}
else
{
MessageBox.Show("Employee does not exist in the database.");
txtlastname.Text = "";
txtfirstname.Text = "";
txtmiddleInitial.Text = "";
txtdays.Text = "";
txtOtHours.Text = "";
txtempid.Text = "";
txtbasicpay.Text = "";
txtOTpay.Text = "";
txtgross.Text = "";
txtNet.Text = "";
lbllname.Text = "";
lblfname.Text = "";
lblmiddleinitial.Text = "";
lblempnum.Text="";
}
}
catch (Exception ex)
{
MessageBox.Show($"An error occurred: {ex.Message}");
}
}
lbllname.Text = lastName;
lblfname.Text = firstName;
lblmiddleinitial.Text = middleInitial;
_collection.UpdateOne(filter, update);
txtempid.Text = employeeId;
txtlastname.Text = lastName;
txtfirstname.Text = firstName;
txtmiddleInitial.Text = middleInitial;
txtdays.Text = daysWorked.ToString();
txtOtHours.Text = otHours.ToString();
txtbasicpay.Text = basicSalary.ToString("C", new
System.Globalization.CultureInfo("en-PH"));
txtOTpay.Text = overtimePay.ToString("C", new
System.Globalization.CultureInfo("en-PH"));
txtgross.Text = grossSalary.ToString("C", new
System.Globalization.CultureInfo("en-PH"));
txtNet.Text = netSalary.ToString("C", new
System.Globalization.CultureInfo("en-PH"));