You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
95 lines
3.1 KiB
95 lines
3.1 KiB
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Text;
|
|
using System.Windows.Forms;
|
|
using Stone.Common;
|
|
|
|
namespace Stone.WinModule.BasicData
|
|
{
|
|
public partial class frmLocationDetail : Stone.WinModule.BasicData.frmBaseMainDetail
|
|
{
|
|
public frmLocationDetail()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmColorDetail_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public override bool GetData()
|
|
{
|
|
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtAddress1, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtAddress2, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtAddress3, "")) return false;
|
|
|
|
base.GetData();
|
|
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim());
|
|
drData["Address1"] = MyStrings.GetString(this.txtAddress1.Text.Trim());
|
|
drData["Address2"] = MyStrings.GetString(this.txtAddress2.Text.Trim());
|
|
drData["Address3"] = MyStrings.GetString(this.txtAddress3.Text.Trim());
|
|
drData["LocCode1"] = MyStrings.GetString(this.txtLocCode1.Text.Trim());
|
|
// drData["LocCode2"] = MyStrings.GetString(this.txtLocCode2.Text.Trim());
|
|
// drData["LocCode3"] = MyStrings.GetString(this.txtLocCode3.Text.Trim());
|
|
// drData["LocCode4"] = MyStrings.GetString(this.txtLocCode4.Text.Trim());
|
|
if (cbState.Checked)
|
|
{
|
|
drData["State"] = "1";
|
|
}
|
|
else
|
|
{
|
|
drData["State"] = "0";
|
|
}
|
|
|
|
|
|
|
|
return true;
|
|
}
|
|
|
|
public override bool SetData()
|
|
{
|
|
|
|
if (base.SetData())
|
|
{
|
|
this.txtCode.Text = drData["Code"].ToString();
|
|
this.txtAddress1.Text = drData["Address1"].ToString();
|
|
this.txtAddress2.Text = drData["Address2"].ToString();
|
|
this.txtAddress3.Text = drData["Address3"].ToString();
|
|
this.txtLocCode1.Text = drData["LocCode1"].ToString();
|
|
// this.txtLocCode2.Text = drData["LocCode2"].ToString();
|
|
// this.txtLocCode3.Text = drData["LocCode3"].ToString();
|
|
// this.txtLocCode4.Text = drData["LocCode4"].ToString();
|
|
var strState = drData["State"].ToString();
|
|
if (strState == "1")
|
|
{
|
|
cbState.Checked = true;
|
|
}
|
|
else
|
|
{
|
|
cbState.Checked = false;
|
|
}
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
base.Clear();
|
|
this.txtCode.Text = "";
|
|
this.txtAddress1.Text = "";
|
|
this.txtAddress2.Text = "";
|
|
this.txtAddress3.Text = "";
|
|
this.txtLocCode1.Text = "";
|
|
cbState.Checked = true;
|
|
|
|
this.txtCode.Focus();
|
|
}
|
|
|
|
}
|
|
}
|
|
|