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.
154 lines
5.0 KiB
154 lines
5.0 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.BasicData;
|
|
using Stone.Entity;
|
|
|
|
namespace Stone.WinModule.BasicData
|
|
{
|
|
public partial class frmFeatureDetail : Stone.WinModule.BasicData.frmBaseMainDetail
|
|
{
|
|
public frmFeatureDetail()
|
|
{
|
|
InitializeComponent();
|
|
|
|
try
|
|
{
|
|
|
|
this.txtGroups.DataSource = new Entity_t_Sys_AppconfigItem().GetData("[Code]='Feature'").Tables[0];
|
|
this.txtGroups.DisplayMember = "Value1";
|
|
this.txtGroups.ValueMember = "Value1";
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void frmColorDetail_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
public override bool GetData()
|
|
{
|
|
if (!MyValidator.IsEmpty(this.txtCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtName, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtMatchCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtCarModelCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtPartsFamilyCode, "")) return false;
|
|
if (!MyValidator.IsEmpty(this.txtSupplyGroupCode, "")) return false;
|
|
|
|
|
|
base.GetData();
|
|
drData["Groups"] = MyStrings.GetString(this.txtGroups.SelectedValue.ToString().Trim());
|
|
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim());
|
|
drData["Name"] = MyStrings.GetString(this.txtName.Text.Trim());
|
|
drData["MatchCode"] = MyStrings.GetString(this.txtMatchCode.Text.Trim());
|
|
drData["CarModelCode"] = MyStrings.GetString(this.txtCarModelCode.Text.Trim());
|
|
drData["PartsFamilyCode"] = MyStrings.GetString(this.txtPartsFamilyCode.Text.Trim());
|
|
drData["SupplyGroupCode"] = MyStrings.GetString(this.txtSupplyGroupCode.Text.Trim());
|
|
drData["Memo"] = this.txtMemo.Text.Trim();
|
|
|
|
|
|
return true;
|
|
}
|
|
|
|
public override bool SetData()
|
|
{
|
|
if (type == 2)
|
|
{
|
|
this.txtCode.ReadOnly = true;
|
|
}
|
|
|
|
if (base.SetData())
|
|
{
|
|
this.txtGroups.SelectedValue = drData["Groups"].ToString();
|
|
this.txtCode.Text = drData["Code"].ToString();
|
|
this.txtName.Text = drData["Name"].ToString();
|
|
this.txtMatchCode.Text = drData["MatchCode"].ToString();
|
|
this.txtCarModelCode.Text = drData["CarModelCode"].ToString();
|
|
this.txtPartsFamilyCode.Text = drData["PartsFamilyCode"].ToString();
|
|
this.txtSupplyGroupCode.Text = drData["SupplyGroupCode"].ToString();
|
|
this.txtMemo.Text = drData["Memo"].ToString();
|
|
|
|
|
|
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
base.Clear();
|
|
this.txtCode.Text = "";
|
|
this.txtName.Text = "";
|
|
this.txtCarModelCode.Text = "";
|
|
this.txtPartsFamilyCode.Text = "";
|
|
this.txtSupplyGroupCode.Text = "";
|
|
this.txtMemo.Text = "";
|
|
this.txtCode.Focus();
|
|
}
|
|
|
|
private void txtCarModelCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmCarModel frm = new frmCarModel();
|
|
frm.m_Base = new F_CarModel();
|
|
if (frm.ShowSelect("") == DialogResult.OK)
|
|
{
|
|
this.txtCarModelCode.Text = frm.SelectValue;
|
|
}
|
|
frm.Dispose();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void txtPartsFamilyCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmPartsFamily frm = new frmPartsFamily();
|
|
frm.m_Base = new F_PartsFamily();
|
|
if (frm.ShowSelect(this.txtCarModelCode.Text) == DialogResult.OK)
|
|
{
|
|
this.txtPartsFamilyCode.Text = frm.SelectValue;
|
|
}
|
|
frm.Dispose();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
private void txtSupplyGroupCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmSupplyGroup frm = new frmSupplyGroup();
|
|
frm.m_Base = new F_SupplyGroup();
|
|
if (frm.ShowSelect(this.txtPartsFamilyCode.Text) == DialogResult.OK)
|
|
{
|
|
this.txtSupplyGroupCode.Text = frm.SelectValue;
|
|
}
|
|
frm.Dispose();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|