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.
102 lines
3.1 KiB
102 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;
|
|
using Stone.WinBiz.BasicData;
|
|
using Stone.Entity;
|
|
|
|
namespace Stone.WinModule.BasicData
|
|
{
|
|
public partial class frmSupplyGroupDetail : Stone.WinModule.BasicData.frmBaseMainDetail
|
|
{
|
|
public frmSupplyGroupDetail()
|
|
{
|
|
InitializeComponent();
|
|
|
|
try
|
|
{
|
|
this.txtPrintGroup.DataSource = new Entity_t_Sys_AppconfigItem().GetData("[Code]='print_group'").Tables[0];
|
|
this.txtPrintGroup.DisplayMember = "Value1";
|
|
this.txtPrintGroup.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.txtPartsFamilyCode, "")) return false;
|
|
|
|
base.GetData();
|
|
drData["Code"] = MyStrings.GetString(this.txtCode.Text.Trim());
|
|
drData["Name"] = MyStrings.GetString(this.txtName.Text.Trim());
|
|
drData["PartsFamilyCode"] = this.txtPartsFamilyCode.Text.Trim();
|
|
drData["PrintGroup"] = this.txtPrintGroup.SelectedValue.ToString();
|
|
drData["Memo"] = MyStrings.GetString(this.txtMemo.Text.Trim());
|
|
|
|
return true;
|
|
}
|
|
|
|
public override bool SetData()
|
|
{
|
|
if (type == 2)
|
|
{
|
|
this.txtCode.ReadOnly = true;
|
|
}
|
|
|
|
if (base.SetData())
|
|
{
|
|
this.txtCode.Text = drData["Code"].ToString();
|
|
this.txtName.Text = drData["Name"].ToString();
|
|
this.txtPartsFamilyCode.Text = drData["PartsFamilyCode"].ToString();
|
|
this.txtPrintGroup.SelectedValue = drData["PrintGroup"].ToString();
|
|
this.txtMemo.Text = drData["Memo"].ToString();
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
public override void Clear()
|
|
{
|
|
base.Clear();
|
|
this.txtCode.Text = "";
|
|
this.txtName.Text = "";
|
|
this.txtPartsFamilyCode.Text = "";
|
|
this.txtPrintGroup.SelectedValue = "";
|
|
this.txtMemo.Text = "";
|
|
this.txtCode.Focus();
|
|
}
|
|
|
|
private void txtPartsFamilyCode_OnSelectClick(object sender, EventArgs e)
|
|
{
|
|
try
|
|
{
|
|
frmPartsFamily frm = new frmPartsFamily();
|
|
frm.m_Base = new F_PartsFamily();
|
|
if (frm.ShowSelect("") == DialogResult.OK)
|
|
{
|
|
this.txtPartsFamilyCode.Text = frm.SelectValue;
|
|
}
|
|
frm.Dispose();
|
|
}
|
|
catch (Exception ex)
|
|
{
|
|
MyMessageBox.ShowErrorMessage(ex.Message);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|
|
|