using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
namespace BLL
{
///
/// ·µ»Ø»ù´¡×ÊÁÏÐÅÏ¢ÀàK3
///
public class ClsBaseSelect_K3
{
#region ÉèÖÃÎı¾¿ò
//³É±¾¶ÔÏó
///
/// ³É±¾¶ÔÏó ·µ»Ø´úÂë
///
///
public static void SetTextBycbCostObj_K3(TextBox txt, bool backNumber)
{
DAL.ClsK3_cbCostObj_View oCost = new DAL.ClsK3_cbCostObj_View();
if (oCost.RefreshView())
{
txt.Text = oCost.oModel.HNumber;
txt.Tag = oCost.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//¹©Ó¦ÉÌ
///
/// ¹©Ó¦ÉÌ ·µ»Ø´úÂë
///
///
public static void SetTextBySupplier_K3(TextBox txt, bool backNumber)
{
DAL.ClsK3_Supplier_View oSup = new DAL.ClsK3_Supplier_View();
if (oSup.RefreshView())
{
txt.Text = oSup.oModel.HNumber;
txt.Tag = oSup.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3Ö°Ô±
public static void SetTextByEmp_K3(TextBox txt)
{
DAL.ClsK3_Employee_View oEmp = new DAL.ClsK3_Employee_View();
if (oEmp.RefreshView())
{
txt.Text = oEmp.oModel.HName;
txt.Tag = oEmp.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//³É±¾¶ÔÏó
///
/// ³É±¾¶ÔÏó
///
///
public static void SetTextBycbCostObj_K3(TextBox txt)
{
DAL.ClsK3_cbCostObj_View oCO = new DAL.ClsK3_cbCostObj_View();
if (oCO.RefreshView())
{
txt.Text = oCO.oModel.HName;
txt.Tag = oCO.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3²¿ÃÅ
///
/// Ñ¡ÔñK3²¿ÃÅ
///
/// µÝÈëÎı¾¿ò
/// ÊÇ·ñ·µ»Ø´úÂë
public static void SetTextByDept_K3(TextBox txt,bool BackNumber)
{
DAL.ClsK3_Department_View oDept = new DAL.ClsK3_Department_View();
if (oDept.RefreshView())
{
if (BackNumber==false)
{
txt.Text = oDept.oModel.HName;
txt.Tag = oDept.oModel.HItemID.ToString();
}
else
{
txt.Text = oDept.oModel.HNumber;
txt.Tag = oDept.oModel.HItemID.ToString();
}
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3²¿ÃÅ
///
/// Ñ¡ÔñK3²¿ÃÅ
///
/// µÝÈëÎı¾¿ò
public static void SetTextByDept_K3(TextBox txt)
{
DAL.ClsK3_Department_View oDept = new DAL.ClsK3_Department_View();
if (oDept.RefreshView())
{
txt.Text = oDept.oModel.HName;
txt.Tag = oDept.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3²Ö¿â
public static void SetTextByWareHouse_K3(TextBox txt)
{
DAL.ClsK3_Warehouse_View oWh = new DAL.ClsK3_Warehouse_View();
if (oWh.RefreshView())
{
txt.Text = oWh.oModel.HName;
txt.Tag = oWh.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3²Ö¿â
public static void SetTextByWareHouse_K3(TextBox txt,bool BackNumber)
{
DAL.ClsK3_Warehouse_View oWh = new DAL.ClsK3_Warehouse_View();
if (oWh.RefreshView())
{
txt.Text = oWh.oModel.HNumber;
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3¿Í»§
public static void SetTextByCus_K3(TextBox txt)
{
DAL.ClsK3_Customer_View oCus = new DAL.ClsK3_Customer_View();
if (oCus.RefreshView())
{
txt.Text = oCus.oModel.HName;
txt.Tag = oCus.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3°à×é
public static void SetTextByGroup_K3(TextBox txt)
{
DAL.ClsK3_Group_View oGroup = new DAL.ClsK3_Group_View();
if (oGroup.RefreshView())
{
txt.Text = oGroup.oModel.HName;
txt.Tag = oGroup.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3¹¤Ðò
public static void SetTextByProc_K3(TextBox txt)
{
DAL.ClsK3_Process_View oProc = new DAL.ClsK3_Process_View();
if (oProc.RefreshView())
{
txt.Text = oProc.oModel.HName;
txt.Tag = oProc.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3ÏúÊÛ·½Ê½
public static void SetTextBySellStyle_K3(TextBox txt)
{
DAL.ClsK3_SellStyle_View oSellStyle = new DAL.ClsK3_SellStyle_View();
if (oSellStyle.RefreshView())
{
txt.Text = oSellStyle.oModel.HName;
txt.Tag = oSellStyle.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3½áË㷽ʽ
public static void SetTextBySettleStyle_K3(TextBox txt)
{
DAL.ClsK3_SettleStyle_View oSettleStyle = new DAL.ClsK3_SettleStyle_View();
if (oSettleStyle.RefreshView())
{
txt.Text = oSettleStyle.oModel.HName;
txt.Tag = oSettleStyle.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3¹©Ó¦ÉÌ
public static void SetTextBySupplier_K3(TextBox txt)
{
DAL.ClsK3_Supplier_View oSup = new DAL.ClsK3_Supplier_View();
if (oSup.RefreshView())
{
txt.Text = oSup.oModel.HName;
txt.Tag = oSup.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3¼ÆÁ¿µ¥Î»
public static void SetTextByUnit_K3(TextBox txt)
{
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oUnit.RefreshView())
{
txt.Text = oUnit.oModel.HName;
txt.Tag = oUnit.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3¼ÆÁ¿µ¥Î»×é
public static void SetTextByUnitGroup_K3(TextBox txt)
{
DAL.ClsK3_UnitGroup_View oUnitGroup = new DAL.ClsK3_UnitGroup_View();
if (oUnitGroup.RefreshView())
{
txt.Text = oUnitGroup.oModel.HName;
txt.Tag = oUnitGroup.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3ÎïÁÏÉϼ¶×é
public static void SetTextByMaterGroup_K3(TextBox txt)
{
DAL.ClsK3_MaterGroup_View oMaterGroup = new DAL.ClsK3_MaterGroup_View();
if (oMaterGroup.RefreshViewForBig(""))
{
txt.Text = oMaterGroup.oModel.HNumber;
txt.Tag = oMaterGroup.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3ÎïÁÏ
///
/// Ñ¡ÔñK3ÎïÁÏ
///
/// ´úÂëÎı¾¿ò
/// Ãû³ÆÎı¾¿ò
/// ¹æ¸ñÎı¾¿ò
/// µ¥Î»Îı¾¿ò
public static void SetTextByMater_K3(TextBox txtNumber,TextBox txtName,TextBox txtModel,TextBox txtUnit)
{
DAL.ClsK3_Material_View oMater = new DAL.ClsK3_Material_View();
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oMater.RefreshView())
{
if (oMater.GetInfoByID(oMater.oModel.HItemID))
{
txtNumber.Tag = oMater.omodel.HItemID.ToString();
txtNumber.Text = oMater.omodel.HNumber;
txtName.Text = oMater.omodel.HName;
txtModel.Text = oMater.omodel.HModel;
if (oUnit.GetInfoByID(oMater.omodel.HItemID))
{
txtUnit.Text = oUnit.omodel.HName;
txtUnit.Tag = oUnit.omodel.HItemID.ToString();
}
else
{
txtUnit.Text ="";
txtUnit.Tag = "0";
}
}
}
else
{
txtNumber.Tag = "0";
txtNumber.Text = "";
txtName.Text = "";
txtModel.Text = "";
txtUnit.Text = "";
txtUnit.Tag = "0";
}
}
//Ñ¡ÔñK3ÎïÁÏ
///
/// Ñ¡ÔñK3ÎïÁÏ
///
/// ´úÂëÎı¾¿ò
/// Ãû³ÆÎı¾¿ò
/// ¹æ¸ñÎı¾¿ò
public static void SetTextByMater_K3(TextBox txtNumber, TextBox txtName, TextBox txtModel)
{
DAL.ClsK3_Material_View oMater = new DAL.ClsK3_Material_View();
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oMater.RefreshView())
{
//if (oMater.GetInfoByID(oMater.omodel.HItemID))
//{
txtNumber.Tag = oMater.omodel.HItemID.ToString();
txtNumber.Text = oMater.omodel.HNumber;
txtName.Text = oMater.omodel.HName;
txtModel.Text = oMater.omodel.HModel;
//}
}
else
{
txtNumber.Tag = "0";
txtNumber.Text = "";
txtName.Text = "";
txtModel.Text = "";
}
}
//Ñ¡ÔñK3ÎïÁÏ
///
/// Ñ¡ÔñK3ÎïÁÏ
///
/// ´úÂëÎı¾¿ò
public static void SetTextByMater_K3(TextBox txtNumber)
{
DAL.ClsK3_Material_View oMater = new DAL.ClsK3_Material_View();
if (oMater.RefreshView())
{
if (oMater.GetInfoByID(oMater.omodel.HItemID))
{
txtNumber.Tag = oMater.omodel.HItemID.ToString();
txtNumber.Text = oMater.omodel.HNumber;
}
else
{
txtNumber.Tag = "0";
txtNumber.Text = "";
}
}
else
{
txtNumber.Tag = "0";
txtNumber.Text = "";
}
}
//Ñ¡ÔñK3±Ò±ð
public static void SetTextByCur_K3(TextBox txt,TextBox txtHRate)
{
DAL.ClsK3_Currency_View oCur = new DAL.ClsK3_Currency_View();
if (oCur.RefreshView())
{
if (oCur.GetInfoByID(oCur.oModel.HItemID))
{
txt.Text = oCur.omodel.HName;
txt.Tag = oCur.omodel.HItemID.ToString();
txtHRate.Text = oCur.omodel.HExRate.ToString();
}
else
{
txt.Text = "";
txt.Tag = "0";
txtHRate.Text = "1";
}
}
else
{
txt.Text = "";
txt.Tag = "0";
txtHRate.Text = "1";
}
}
//Ñ¡ÔñK3ÁìÁϵ¥
public static void SetTextByMateOutBill_K3(TextBox txt)
{
DAL.ClsK3_MateOutBill_View oMateOutBill = new DAL.ClsK3_MateOutBill_View();
if (oMateOutBill.RefreshView())
{
txt.Text = oMateOutBill.oModel.HNumber.ToString();
txt.Tag = oMateOutBill.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñÁìÁÏÉêÇëµ¥
public static void SetTextByMateOutRequestBill_K3(TextBox txt)
{
DAL.ClsKf_MateOutRequestBill_View oMateOutRequestBill = new DAL.ClsKf_MateOutRequestBill_View();
if (oMateOutRequestBill.RefreshView())
{
txt.Text = oMateOutRequestBill.oModel.HNumber.ToString();
txt.Tag = oMateOutRequestBill.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñÉú²úÈÎÎñµ¥K3
public static void SetTextByICMOBill_K3(TextBox txt)
{
DAL.ClsK3_ICMOBill_View oICMO = new DAL.ClsK3_ICMOBill_View();
if (oICMO.RefreshView())
{
txt.Text = oICMO.oModel.HNumber.ToString();
txt.Tag = oICMO.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
//Ñ¡ÔñK3Éú²ú×ÊÔ´
public static void SetTextBySource_K3(TextBox txt)
{
DAL.ClsK3_Source_View oSource = new DAL.ClsK3_Source_View();
if (oSource.RefreshView())
{
txt.Text = oSource.oModel.HName;
txt.Tag = oSource.oModel.HItemID.ToString();
}
else
{
txt.Text = "";
}
}
#endregion
#region ÉèÖÃÍø¸ñ
//ÎïÁÏ-Íø¸ñ
///
/// ÎïÁÏ-Íø¸ñ
///
///
///
///
///
///
///
///
///
///
public static void SetGridByMater_K3(DataGridView grdMain, int i, int HMaterIDCol, int HMaterNumberCol, int HMaterNameCol, int HMaterModelCol, int HUnitIDCol, int HUnitNumberCol, int HUnitNameCol)
{
DAL.ClsK3_Material_View oMater = new DAL.ClsK3_Material_View();
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oMater.RefreshView())
{
if (oMater.GetInfoByID(oMater.omodel.HItemID))
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
grdMain.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName;
grdMain.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
if (oUnit.GetInfoByID(oMater.omodel.HUnitID))
{
grdMain.Rows[i].Cells[HUnitNumberCol].Value = oUnit.omodel.HNumber;
grdMain.Rows[i].Cells[HUnitNameCol].Value = oUnit.omodel.HName;
grdMain.Rows[i].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString();
}
else
{
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
else
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterNameCol].Value = "";
grdMain.Rows[i].Cells[HMaterModelCol].Value = "";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
else
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterNameCol].Value = "";
grdMain.Rows[i].Cells[HMaterModelCol].Value = "";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
//²Ö¿â-Íø¸ñ
///
/// ²Ö¿â-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByWareHouse_K3(DataGridView grdMain, int i, int HWhIDCol, int HWhNumberCol, int HWhNameCol)
{
DAL.ClsK3_Warehouse_View oWh = new DAL.ClsK3_Warehouse_View();
if (oWh.RefreshView())
{
if (oWh.GetInfoByID(oWh.oModel.HItemID))
{
grdMain.Rows[i].Cells[HWhIDCol].Value = oWh.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HWhNumberCol].Value = oWh.omodel.HNumber;
grdMain.Rows[i].Cells[HWhNameCol].Value = oWh.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HWhIDCol].Value = "0";
grdMain.Rows[i].Cells[HWhNumberCol].Value = "";
grdMain.Rows[i].Cells[HWhNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HWhIDCol].Value = "0";
grdMain.Rows[i].Cells[HWhNumberCol].Value = "";
grdMain.Rows[i].Cells[HWhNameCol].Value = "";
}
}
//ÎïÁÏ-Íø¸ñ
///
/// ÎïÁÏ-Íø¸ñ
///
///
///
///
///
///
///
///
///
///
public static void SetGridByMater_K3(DataGridView grdMain, int i, int HMaterIDCol, int HMaterNumberCol, int HMaterNameCol, int HMaterModelCol, int HUnitIDCol, int HUnitNumberCol, int HUnitNameCol, int HQtyDecimalCol, int HPriceDecimalCol)
{
DAL.ClsK3_Material_View oMater = new DAL.ClsK3_Material_View();
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oMater.RefreshView())
{
if (oMater.GetInfoByID(oMater.omodel.HItemID))
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = oMater.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HMaterNumberCol].Value = oMater.omodel.HNumber;
grdMain.Rows[i].Cells[HMaterNameCol].Value = oMater.omodel.HName;
grdMain.Rows[i].Cells[HMaterModelCol].Value = oMater.omodel.HModel;
grdMain.Rows[i].Cells[HQtyDecimalCol].Value = oMater.omodel.HQtyDecimal;
grdMain.Rows[i].Cells[HPriceDecimalCol].Value = oMater.omodel.HPriceDecimal;
if (oUnit.GetInfoByID(oMater.omodel.HUnitID))
{
grdMain.Rows[i].Cells[HUnitNumberCol].Value = oUnit.omodel.HNumber;
grdMain.Rows[i].Cells[HUnitNameCol].Value = oUnit.omodel.HName;
grdMain.Rows[i].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString();
}
else
{
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
else
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterNameCol].Value = "";
grdMain.Rows[i].Cells[HMaterModelCol].Value = "";
grdMain.Rows[i].Cells[HQtyDecimalCol].Value = "0";
grdMain.Rows[i].Cells[HPriceDecimalCol].Value = "0";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
else
{
grdMain.Rows[i].Cells[HMaterIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterNameCol].Value = "";
grdMain.Rows[i].Cells[HMaterModelCol].Value = "";
grdMain.Rows[i].Cells[HQtyDecimalCol].Value = "0";
grdMain.Rows[i].Cells[HPriceDecimalCol].Value = "0";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
}
}
//²Öλ-Íø¸ñ
///
/// ²Öλ-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByStockPlace_K3(DataGridView grdMain, int i, int HSPIDCol, int HSPNumberCol, int HSPNameCol)
{
DAL.ClsK3_StockPlace_View oSP = new DAL.ClsK3_StockPlace_View();
if (oSP.RefreshView())
{
if (oSP.GetInfoByID(oSP.oModel.HItemID))
{
grdMain.Rows[i].Cells[HSPIDCol].Value = oSP.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HSPNumberCol].Value = oSP.omodel.HNumber;
grdMain.Rows[i].Cells[HSPNameCol].Value = oSP.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
//²Öλ-Íø¸ñ
///
/// ²Öλ-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByStockPlace_K3(DataGridView grdMain, int i,Int64 HMaterID, int HSPIDCol, int HSPNumberCol, int HSPNameCol)
{
DAL.ClsK3_StockPlace_View oSP = new DAL.ClsK3_StockPlace_View();
if (oSP.RefreshViewByRelation(HMaterID))
{
if (oSP.GetInfoByID(oSP.oModel.HItemID))
{
grdMain.Rows[i].Cells[HSPIDCol].Value = oSP.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HSPNumberCol].Value = oSP.omodel.HNumber;
grdMain.Rows[i].Cells[HSPNameCol].Value = oSP.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
//²Öλ-Íø¸ñ
///
/// ²Öλ-Íø¸ñ ¸ù¾Ý²Ö¿â»ñÈ¡²Öλ
///
///
///
///
///
///
public static void SetGridByStockPlaceToWH_K3(DataGridView grdMain, int i, Int64 HWHID, int HSPIDCol, int HSPNumberCol, int HSPNameCol)
{
DAL.ClsK3_StockPlace_View oSP = new DAL.ClsK3_StockPlace_View();
if (oSP.RefreshViewByWH(HWHID))
{
if (oSP.GetInfoByID(oSP.oModel.HItemID))
{
grdMain.Rows[i].Cells[HSPIDCol].Value = oSP.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HSPNumberCol].Value = oSP.omodel.HNumber;
grdMain.Rows[i].Cells[HSPNameCol].Value = oSP.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HSPIDCol].Value = "0";
grdMain.Rows[i].Cells[HSPNumberCol].Value = "";
grdMain.Rows[i].Cells[HSPNameCol].Value = "";
}
}
//¼ÆÁ¿µ¥Î»-Íø¸ñ
///
/// ¼ÆÁ¿µ¥Î»-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByUnit_K3(DataGridView grdMain, int i, int HUnitIDCol, int HUnitNumberCol, int HUnitNameCol)
{
DAL.ClsK3_Unit_View oUnit = new DAL.ClsK3_Unit_View();
if (oUnit.RefreshView())
{
if (oUnit.GetInfoByID(oUnit.oModel.HItemID))
{
grdMain.Rows[i].Cells[HUnitIDCol].Value = oUnit.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HUnitNumberCol].Value = oUnit.omodel.HNumber;
grdMain.Rows[i].Cells[HUnitNameCol].Value = oUnit.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HUnitIDCol].Value = "0";
grdMain.Rows[i].Cells[HUnitNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitNameCol].Value = "";
}
}
//¼ÆÁ¿µ¥Î»×é-Íø¸ñ
///
/// ¼ÆÁ¿µ¥Î»×é-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByUnitGroup_K3(DataGridView grdMain, int i, int HUnitGroupIDCol, int HUnitGroupNumberCol, int HUnitGroupNameCol)
{
DAL.ClsK3_UnitGroup_View oUnitGroup = new DAL.ClsK3_UnitGroup_View();
if (oUnitGroup.RefreshView())
{
if (oUnitGroup.GetInfoByID(oUnitGroup.oModel.HItemID))
{
grdMain.Rows[i].Cells[HUnitGroupIDCol].Value = oUnitGroup.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HUnitGroupNumberCol].Value = oUnitGroup.omodel.HNumber;
grdMain.Rows[i].Cells[HUnitGroupNameCol].Value = oUnitGroup.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HUnitGroupIDCol].Value = "0";
grdMain.Rows[i].Cells[HUnitGroupNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitGroupNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HUnitGroupIDCol].Value = "0";
grdMain.Rows[i].Cells[HUnitGroupNumberCol].Value = "";
grdMain.Rows[i].Cells[HUnitGroupNameCol].Value = "";
}
}
//ÎïÁÏÉϼ¶×é-Íø¸ñ
///
/// ÎïÁÏÉϼ¶×é-Íø¸ñ
///
///
///
///
///
public static void SetGridByMaterGroup_K3(DataGridView grdMain, int i, int HParentIDCol, int HParentNumberCol,int HParentNameCol)
{
DAL.ClsK3_MaterGroup_View oMaterGroup = new DAL.ClsK3_MaterGroup_View();
if (oMaterGroup.RefreshViewForBig(""))
{
if (oMaterGroup.GetInfoByID(oMaterGroup.oModel.HItemID))
{
grdMain.Rows[i].Cells[HParentIDCol].Value = oMaterGroup.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HParentNumberCol].Value = oMaterGroup.omodel.HNumber;
grdMain.Rows[i].Cells[HParentNameCol].Value = oMaterGroup.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HParentIDCol].Value = "0";
grdMain.Rows[i].Cells[HParentNumberCol].Value = "";
grdMain.Rows[i].Cells[HParentNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HParentIDCol].Value = "0";
grdMain.Rows[i].Cells[HParentNumberCol].Value = "";
grdMain.Rows[i].Cells[HParentNameCol].Value = "";
}
}
//ÎïÁÏÊôÐÔ-Íø¸ñ
public static void SetGridByErpCls_K3(DataGridView grdMain, int i, int HErpClsIDCol, int HErpClsNameCol)
{
DAL.ClsK3_ErpCls_View oErpCls = new DAL.ClsK3_ErpCls_View();
if (oErpCls.RefreshView())
{
if (oErpCls.GetInfoByID(oErpCls.oModel.HItemID))
{
grdMain.Rows[i].Cells[HErpClsIDCol].Value = oErpCls.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HErpClsNameCol].Value = oErpCls.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HErpClsIDCol].Value = "0";
grdMain.Rows[i].Cells[HErpClsNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HErpClsIDCol].Value = "0";
grdMain.Rows[i].Cells[HErpClsNameCol].Value = "";
}
}
//²¿ÃÅ-Íø¸ñ
///
/// ²¿ÃÅ-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByDept_K3(DataGridView grdMain, int i, int HDeptIDCol, int HDeptNumberCol, int HDeptNameCol)
{
DAL.ClsK3_Department_View oDept = new DAL.ClsK3_Department_View();
if (oDept.RefreshView())
{
if (oDept.GetInfoByID(oDept.oModel.HItemID))
{
grdMain.Rows[i].Cells[HDeptIDCol].Value = oDept.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HDeptNumberCol].Value = oDept.omodel.HNumber;
grdMain.Rows[i].Cells[HDeptNameCol].Value = oDept.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HDeptIDCol].Value = "0";
grdMain.Rows[i].Cells[HDeptNumberCol].Value = "";
grdMain.Rows[i].Cells[HDeptNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HDeptIDCol].Value = "0";
grdMain.Rows[i].Cells[HDeptNumberCol].Value = "";
grdMain.Rows[i].Cells[HDeptNameCol].Value = "";
}
}
//Ö°Ô±-Íø¸ñ
///
/// Ö°Ô±-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByEmp_K3(DataGridView grdMain, int i, int HEmpIDCol, int HEmpNumberCol, int HEmpNameCol)
{
DAL.ClsK3_Employee_View oEmp = new DAL.ClsK3_Employee_View();
if (oEmp.RefreshView())
{
if (oEmp.GetInfoByID(oEmp.oModel.HItemID))
{
grdMain.Rows[i].Cells[HEmpIDCol].Value = oEmp.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HEmpNumberCol].Value = oEmp.omodel.HNumber;
grdMain.Rows[i].Cells[HEmpNameCol].Value = oEmp.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HEmpIDCol].Value = "0";
grdMain.Rows[i].Cells[HEmpNumberCol].Value = "";
grdMain.Rows[i].Cells[HEmpNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HEmpIDCol].Value = "0";
grdMain.Rows[i].Cells[HEmpNumberCol].Value = "";
grdMain.Rows[i].Cells[HEmpNameCol].Value = "";
}
}
//°à×é-Íø¸ñ
///
/// °à×é-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByGroup_K3(DataGridView grdMain, int i, int HGroupIDCol, int HGroupNumberCol, int HGroupNameCol)
{
DAL.ClsK3_Group_View oGroup = new DAL.ClsK3_Group_View();
if (oGroup.RefreshView())
{
if (oGroup.GetInfoByID(oGroup.oModel.HItemID))
{
grdMain.Rows[i].Cells[HGroupIDCol].Value = oGroup.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HGroupNumberCol].Value = oGroup.omodel.HNumber;
grdMain.Rows[i].Cells[HGroupNameCol].Value = oGroup.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HGroupIDCol].Value = "0";
grdMain.Rows[i].Cells[HGroupNumberCol].Value = "";
grdMain.Rows[i].Cells[HGroupNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HGroupIDCol].Value = "0";
grdMain.Rows[i].Cells[HGroupNumberCol].Value = "";
grdMain.Rows[i].Cells[HGroupNameCol].Value = "";
}
}
//³É±¾¶ÔÏó-Íø¸ñ
///
/// ³É±¾¶ÔÏó-Íø¸ñ
///
///
///
///
///
///
public static void SetGridBycbCostObj_K3(DataGridView grdMain, int i, int HCostObjIDCol, int HCostObjNumberCol, int HCostObjNameCol)
{
DAL.ClsK3_cbCostObj_View ocbC = new DAL.ClsK3_cbCostObj_View();
if (ocbC.RefreshView())
{
if (ocbC.GetInfoByID(ocbC.oModel.HItemID))
{
grdMain.Rows[i].Cells[HCostObjIDCol].Value = ocbC.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HCostObjNumberCol].Value = ocbC.omodel.HNumber;
grdMain.Rows[i].Cells[HCostObjNameCol].Value = ocbC.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HCostObjIDCol].Value = "0";
grdMain.Rows[i].Cells[HCostObjNumberCol].Value = "";
grdMain.Rows[i].Cells[HCostObjNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HCostObjIDCol].Value = "0";
grdMain.Rows[i].Cells[HCostObjNumberCol].Value = "";
grdMain.Rows[i].Cells[HCostObjNameCol].Value = "";
}
}
//ÎïÁÏ·ÖÀà-Íø¸ñ
///
/// ÎïÁÏ·ÖÀà-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByMaterType_K3(DataGridView grdMain, int i, int HMaterTypeIDCol, int HMaterTypeNumberCol, int HMaterTypeNameCol)
{
DAL.ClsK3_MaterType_View oMaterType = new DAL.ClsK3_MaterType_View();
if (oMaterType.RefreshView())
{
if (oMaterType.GetInfoByID(oMaterType.oModel.HItemID))
{
grdMain.Rows[i].Cells[HMaterTypeIDCol].Value = oMaterType.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HMaterTypeNumberCol].Value = oMaterType.omodel.HNumber;
grdMain.Rows[i].Cells[HMaterTypeNameCol].Value = oMaterType.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HMaterTypeIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterTypeNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterTypeNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HMaterTypeIDCol].Value = "0";
grdMain.Rows[i].Cells[HMaterTypeNumberCol].Value = "";
grdMain.Rows[i].Cells[HMaterTypeNameCol].Value = "";
}
}
//¹¤Ðò-Íø¸ñ
///
/// ¹¤Ðò-Íø¸ñ
///
///
///
///
///
///
public static void SetGridByProc_K3(DataGridView grdMain, int i, int HProcIDCol, int HProcNumberCol, int HProcNameCol)
{
DAL.ClsK3_Process_View oProc = new DAL.ClsK3_Process_View();
if (oProc.RefreshView())
{
if (oProc.GetInfoByID(oProc.oModel.HItemID))
{
grdMain.Rows[i].Cells[HProcIDCol].Value = oProc.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HProcNumberCol].Value = oProc.omodel.HNumber;
grdMain.Rows[i].Cells[HProcNameCol].Value = oProc.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HProcIDCol].Value = "0";
grdMain.Rows[i].Cells[HProcNumberCol].Value = "";
grdMain.Rows[i].Cells[HProcNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HProcIDCol].Value = "0";
grdMain.Rows[i].Cells[HProcNumberCol].Value = "";
grdMain.Rows[i].Cells[HProcNameCol].Value = "";
}
}
//¹©Ó¦ÉÌ-Íø¸ñ
///
/// ¹©Ó¦ÉÌ-Íø¸ñ
///
///
///
///
///
///
public static void SetGridBySup_K3(DataGridView grdMain, int i, int HSupIDCol, int HSupNumberCol, int HSupNameCol)
{
DAL.ClsK3_Supplier_View oSup = new DAL.ClsK3_Supplier_View();
if (oSup.RefreshView())
{
if (oSup.GetInfoByID(oSup.oModel.HItemID))
{
grdMain.Rows[i].Cells[HSupIDCol].Value = oSup.omodel.HItemID.ToString();
grdMain.Rows[i].Cells[HSupNumberCol].Value = oSup.omodel.HNumber;
grdMain.Rows[i].Cells[HSupNameCol].Value = oSup.omodel.HName;
}
else
{
grdMain.Rows[i].Cells[HSupIDCol].Value = "0";
grdMain.Rows[i].Cells[HSupNumberCol].Value = "";
grdMain.Rows[i].Cells[HSupNameCol].Value = "";
}
}
else
{
grdMain.Rows[i].Cells[HSupIDCol].Value = "0";
grdMain.Rows[i].Cells[HSupNumberCol].Value = "";
grdMain.Rows[i].Cells[HSupNameCol].Value = "";
}
}
#endregion
}
}