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.
140 lines
4.5 KiB
140 lines
4.5 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;
|
|
using Stone.WinBiz.SystemData;
|
|
using Stone.Entity;
|
|
using Stone.WinBiz.BasicData;
|
|
|
|
namespace Stone.WinModule.BasicData
|
|
{
|
|
public partial class frmProductDetail : Stone.WinModule.BasicData.frmBaseMainDetail
|
|
{
|
|
public frmProductDetail()
|
|
{
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmColorDetail_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public override bool GetData()
|
|
{
|
|
if (this.txtPackNumer.Text.Trim() == "") this.txtPackNumer.Text = "0";
|
|
|
|
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtName, "")) return false;
|
|
|
|
if (!MyValidator.IsEmpty(this.txtCarModelCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtColorCode, "")) return false;
|
|
|
|
if (!MyValidator.IsEmpty(this.txtPackNumer, "")) return false;
|
|
if (!MyValidator.IsNumeric(this.txtPackNumer, "")) return false;
|
|
|
|
|
|
base.GetData();
|
|
|
|
|
|
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim());
|
|
drData["Name"] = MyStrings.GetString(this.txtName.Text.Trim());
|
|
drData["Model"] = MyStrings.GetString(this.txtModel.Text.Trim());
|
|
drData["CarModelCode"] = MyStrings.GetString(this.txtCarModelCode.Text.Trim());
|
|
drData["ColorCode"] = MyStrings.GetString(this.txtColorCode.Text.Trim());
|
|
drData["Deploy"] = MyStrings.GetString(this.txtDeploy.Text.Trim());
|
|
drData["BarCode"] = MyStrings.GetString(this.txtBarCode.Text.Trim());
|
|
drData["IsStandard"] = this.txtIsStandard.Checked ? true : false;
|
|
drData["PackNumer"] = MyStrings.GetString(this.txtPackNumer.Text.Trim());
|
|
drData["State"] = this.cbState.Checked ? true : false;
|
|
|
|
return true;
|
|
}
|
|
|
|
public override bool SetData()
|
|
{
|
|
if (base.SetData())
|
|
{
|
|
this.txtCode.Text = drData["Code"].ToString();
|
|
this.txtName.Text = drData["Name"].ToString();
|
|
this.txtModel.Text = drData["Model"].ToString();
|
|
this.txtCarModelCode.Text = drData["CarModelCode"].ToString();
|
|
this.txtColorCode.Text = drData["ColorCode"].ToString();
|
|
this.txtDeploy.Text = drData["Deploy"].ToString();
|
|
this.txtBarCode.Text = drData["BarCode"].ToString();
|
|
this.txtIsStandard.Checked = Convert.ToBoolean(drData["IsStandard"]);
|
|
this.txtPackNumer.Text = drData["PackNumer"].ToString();
|
|
this.cbState.Checked = Convert.ToBoolean(drData["State"]);
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
base.Clear();
|
|
this.txtCode.Focus();
|
|
this.txtCode.SelectAll();
|
|
cbState.Checked = true;
|
|
txtIsStandard.Checked = true;
|
|
}
|
|
|
|
|
|
|
|
private void txtCarModelCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmCarModel frm = new frmCarModel();
|
|
frm.m_Base = new F_CarModel();
|
|
frm.init();
|
|
|
|
if (frm.ShowSelect(this.txtCarModelCode.Text) == DialogResult.OK)
|
|
{
|
|
this.txtCarModelCode.Text = frm.SelectValue;
|
|
this.txtCarModelCode.Focus();
|
|
this.txtCarModelCode.SelectAll();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void txtColorCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmColor frm = new frmColor();
|
|
frm.m_Base = new F_Color();
|
|
frm.init();
|
|
|
|
if (frm.ShowSelect(this.txtColorCode.Text) == DialogResult.OK)
|
|
{
|
|
this.txtColorCode.Text = frm.SelectValue;
|
|
this.txtColorCode.Focus();
|
|
this.txtColorCode.SelectAll();
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void btnOK_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
private void btnAddNewLine_Click(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
}
|
|
}
|
|
|