27 lines
620 B
C#
27 lines
620 B
C#
namespace C969Project;
|
|
|
|
public partial class AddUpdateCustomerForm : Form
|
|
{
|
|
public enum OperationType { Add, Update }
|
|
public AddUpdateCustomerForm(OperationType operationType)
|
|
{
|
|
InitializeComponent();
|
|
|
|
if (operationType == OperationType.Add) InitAdd();
|
|
else if (operationType == OperationType.Update) InitUpdate();
|
|
}
|
|
|
|
private void InitAdd()
|
|
{
|
|
Text = "Add Customer";
|
|
label1.Text = "Add Customer";
|
|
}
|
|
|
|
private void InitUpdate()
|
|
{
|
|
Text = "Update Customer";
|
|
label1.Text = "Update Customer";
|
|
}
|
|
|
|
// name, {address, phone}
|
|
} |