using System;
|
using System.Collections.Generic;
|
using System.ComponentModel;
|
using System.Data;
|
using System.Drawing;
|
using System.Text;
|
using System.Windows.Forms;
|
using gregn6Lib;
|
using Pub_Class;
|
|
namespace SCM
|
{
|
public partial class JIT_ComplementGoodList : Form
|
{
|
public JIT_ComplementGoodList()
|
{
|
InitializeComponent();
|
}
|
//public DBUtility.frmBillQueryCondition_New frmCondition;
|
public string ViewName = "h_v_CLD_CallGoodList";
|
public string ModCaption = "叫料单列表";
|
public string HInnerBillNo = "";
|
public const string ModName = "4601";
|
public const string ModRightName = "JIT_ComplementGoodList";
|
public const string ModRightNameEdit = ModRightName + "_Edit";
|
public const string ModRightNameCheck = ModRightName + "_Check";
|
public const string ModRightNameClose = ModRightName + "_Close";
|
public const string ModRightNameDelete = ModRightName + "_Delete";
|
public int HHGQtyCol = 0;
|
public int HBHGQtyCol = 0;
|
public int HQtyCol = 0;
|
public int HPlanQtyCol = 0;
|
public int HICMOInterIDCol = 0;
|
public int HICMOEntryIDCol = 0;
|
public int HICMOBillNoCol = 0;
|
public int HSourceInterIDCol = 0;
|
public int HSourceEntryIDCol = 0;
|
public int HSourceBillNoCol = 0;
|
public int HMaterialIDCol = 0;
|
public int HMaterialNumberCol = 0;
|
public int HMaterialModelCol = 0;
|
public int HUnitIDCol = 0;
|
public int HDeptIDCol = 0;
|
public int HDeptNumberCol = 0;
|
public int HJTIDCol = 0;
|
public int HWHIDCol = 0;
|
public int HSPIDCol = 0;
|
public int HProcIDCol = 0;
|
public JIT_CallBill oFrm;
|
Pub_Class.ClsGridViewSum oSumGrid = new Pub_Class.ClsGridViewSum();
|
//public DAL.ClsJIT_CallGoodsBill_CLD BillNew = new DAL.ClsJIT_CallGoodsBill_CLD(); //对应单据类
|
//public DAL.ClsJIT_CallGoodsBill_CLD BillOld = new DAL.ClsJIT_CallGoodsBill_CLD(); //对应单据类
|
public DBUtility.ClsPub.Enum_BillStatus BillStatus; //单据状态(新增,修改,浏览,更新单价,变更)
|
public Int32 iTopRow = 0;//画横线
|
public SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
|
|
//
|
private void initGrid()
|
{
|
DBUtility.Xt_BaseBillFun.initGridList(grdMain, this.Name);
|
grdMain.CellBorderStyle = DataGridViewCellBorderStyle.Single; //网格线样式:显示网格线
|
grdMain.ReadOnly = false;
|
}
|
//
|
|
private void Display()
|
{
|
this.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew;
|
this.txtHBillNo.Text = ClsPub1.CreateBillCode(ModName, ref ClsPub.sExeReturnInfo, true);//得到新单号
|
|
string sDlgWhere = "";
|
sDlgWhere = sDlgWhere + ",'" + txtHSeOrderBillNo.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + txtHDeptID.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + txtHMaterID2.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + txtHMaterName2.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + txtHMaterModel2.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + dtpHBDate.Text.Trim() + "'";
|
sDlgWhere = sDlgWhere + ",'" + dtpHEDate.Text.Trim() + "'";
|
|
if (sDlgWhere.Trim().Length > 0)
|
{
|
sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1);
|
}
|
DataSet DSet;
|
//SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
|
DSet = oWeb.Get_ICMOBillInfo("exec h_p_CLD_CallGoodList " + sDlgWhere, "h_p_CLD_CallGoodList", ref DBUtility.ClsPub.sExeReturnInfo);
|
if (DSet == null || DSet.Tables[0].Rows.Count == 0)
|
{
|
grdMain.DataSource = null;
|
MessageBox.Show("没有返回任何结果,尝试再次查询!" + DBUtility.ClsPub.sExeReturnInfo);
|
return;
|
}
|
grdMain.DataSource = DSet.Tables[0].DefaultView;
|
//设置合计列
|
//string sTotalCol = "";
|
//string[] sT;
|
//sT = sTotalCol.Split(Convert.ToChar(","));
|
//oSumGrid.BuildTotalCols(sT);
|
//
|
//冻结
|
//int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
|
//string s = frmCondition.cmbHComplete.Text;
|
//DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol);
|
//画线
|
SCM.公用类.Xt_BaseBillFun.DisplayGrid(grdMain);
|
GraphLine();
|
|
Total();
|
HBHGQtyCol = Fun_GetCol("叫料数量");
|
HHGQtyCol = Fun_GetCol("退料数量");
|
HPlanQtyCol = Fun_GetCol("计划发料数量");
|
//HQtyCol = Fun_GetCol("订单数量");
|
HICMOInterIDCol = Fun_GetCol("HICMOInterID");
|
HICMOEntryIDCol = Fun_GetCol("HICMOEntryID");
|
HICMOBillNoCol = Fun_GetCol("HICMOBillNo");
|
HMaterialIDCol = Fun_GetCol("HMaterialID");
|
HSourceInterIDCol = Fun_GetCol("HSouceInterID");
|
HSourceEntryIDCol = Fun_GetCol("HSourceEntryID");
|
HSourceBillNoCol = Fun_GetCol("HSourceBillNo");
|
HWHIDCol = Fun_GetCol("HWHID");
|
HSPIDCol = Fun_GetCol("HSPID");
|
HProcIDCol = Fun_GetCol("HProcID");
|
|
|
//
|
}
|
//
|
private void timer1_Tick(object sender, EventArgs e)
|
{
|
timer1.Enabled = false;
|
initGrid();
|
Display();
|
}
|
|
private void tc_Click(object sender, EventArgs e)
|
{
|
this.Close();
|
}
|
|
private void sx_Click(object sender, EventArgs e)
|
{
|
timer1.Enabled = true;
|
}
|
|
private void dj_Click(object sender, EventArgs e)
|
{
|
Sub_ShowBill();
|
}
|
//显示单据
|
private void Sub_ShowBill()
|
{
|
|
Int64 lngBillKey = 0;
|
if (grdMain.CurrentRow == null)
|
return;
|
lngBillKey = DBUtility.ClsPub.isLong(grdMain.Rows[grdMain.CurrentRow.Index].Cells[Fun_GetCol("hmainid")].Value);
|
if (lngBillKey == 0)
|
return;
|
SCM.ClsJIT_CallGoodsBill_CLD oBill = new SCM.ClsJIT_CallGoodsBill_CLD();
|
if (oBill.ShowBill(lngBillKey, ref DBUtility.ClsPub.sExeReturnInfo))
|
{
|
oFrm = new SCM.JIT_CallBill();
|
oFrm.BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
|
oFrm.BillOld = oBill;
|
oFrm.ShowDialog();
|
}
|
else
|
{
|
MessageBox.Show("单据未找到", "提示");
|
}
|
oBill = null;
|
}
|
//
|
private Int32 Fun_GetCol(string sCol)
|
{
|
return DBUtility.Xt_BaseBillFun.Fun_GetCol(sCol, grdMain);
|
}
|
//
|
private void JIT_ComplementGoodList_Load(object sender, EventArgs e)
|
{
|
oWeb.Url = ClsPub1.WEBSURL;
|
//
|
//frmCondition = new DBUtility.frmBillQueryCondition_New();
|
oSumGrid.ogrdMain = grdMain; //初始化 new
|
oSumGrid.oGridsum = grdSum;
|
dtpHBDate.Value = DateTime.Today;
|
dtpHEDate.Value = DateTime.Today;
|
this.Text = ModCaption;
|
lblCaption.Text = ModCaption;
|
ps.Checked = true;
|
initGrid();
|
}
|
|
private void grdMain_DblClick(object sender, EventArgs e)
|
{
|
Sub_ShowBill();
|
}
|
|
private void timer2_Tick(object sender, EventArgs e)
|
{
|
//timer2.Enabled = false;
|
//frmCondition = new DBUtility.frmBillQueryCondition_New();
|
|
//DBUtility.Xt_BaseBillFun.SetCondition(frmCondition, ViewName, this.Name);
|
//frmCondition.ShowDialog();
|
//if (frmCondition.Tag.ToString() == "OK")
|
//{
|
// timer1.Enabled = true;
|
//}
|
}
|
|
|
|
|
private void bclk_Click(object sender, EventArgs e)
|
{
|
//保存列宽
|
DBUtility.Xt_BaseBillFun.SaveGrid(grdMain, this.Name);
|
}
|
|
private void mrlk_Click(object sender, EventArgs e)
|
{
|
DBUtility.Xt_BaseBillFun.DefaultGridView(grdMain, this.Name);
|
}
|
//
|
private void GraphLine()
|
{
|
//int MainIDCol = Fun_GetCol("hmainid");
|
//int SubIDCol = Fun_GetCol("hsubid");
|
//string s = frmCondition.cmbHComplete.Text;
|
//long n = 0;
|
//DBUtility.Xt_BaseBillFun.GraphLine(grdMain, MainIDCol, SubIDCol, s, ref n);
|
////显示
|
//lbldj.Text = "查询出 " + n.ToString() + " 张单据";
|
//lbljl.Text = "共有 " + grdMain.RowCount.ToString() + " 条记录";
|
}
|
|
private void GraphicsGrid()
|
{
|
DBUtility.Xt_BaseBillFun.GraphicsGrid(grdMain);
|
//DBUtility.Xt_BaseBillFun.GraphicsRowGrid(grdMain, iTopRow, iTopRow + 50, Fun_GetCol("hmainid"));
|
}
|
|
#region //打印设置
|
|
GridppReport Report;
|
//预览
|
private void yl_Click(object sender, EventArgs e)
|
{
|
//选择打印模板
|
BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
|
oFrm.sBillName = ModName;
|
oFrm.sBillModel = ModCaption;
|
oFrm.ShowDialog();
|
if (oFrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
|
{
|
//
|
Sub_SetReport(oFrm.sOpenTmp);
|
Report.PrintPreview(true);
|
}
|
}
|
|
private void Sub_SetReport(string sOpenTmp)
|
{
|
//判断行数
|
//
|
Report = new GridppReport();
|
Report.LoadFromFile(DBUtility.ClsPub.AppPath + @"\" + sOpenTmp + ".grf"); //here .
|
Report.FetchRecord += new _IGridppReportEvents_FetchRecordEventHandler(ReportFetchRecordByDataTable);
|
}
|
|
private void ReportFetchRecordByDataTable()
|
{
|
try
|
{
|
//BLL.Utility.FillRecordToReport(Report, grdMain, grdPrint, Fun_GetCol("HMaterID"));
|
}
|
catch (Exception e)
|
{
|
MessageBox.Show("打印失败!:" + e.Message);
|
}
|
}
|
|
#endregion
|
//
|
private void grdMain_Paint(object sender, PaintEventArgs e)
|
{
|
GraphicsGrid();
|
}
|
|
//合计 new
|
private void Total()
|
{
|
if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0)
|
{
|
oSumGrid.SetGridsum();
|
oSumGrid.Total();
|
}
|
}
|
//合计 new
|
private void grdMain_ColumnWidthChanged(object sender, DataGridViewColumnEventArgs e)
|
{
|
Total();
|
}
|
//合计 new
|
private void grdMain_CellMouseUp(object sender, DataGridViewCellMouseEventArgs e)
|
{
|
Total();
|
}
|
//导出EXCEL
|
private void dc_Click(object sender, EventArgs e)
|
{
|
DBUtility.Gy_BaseFun.DataToExcel(this.Text, grdMain);
|
}
|
|
private void cx_Click(object sender, EventArgs e)
|
{
|
Display();
|
}
|
|
private void grdMain_CellEndEdit(object sender, DataGridViewCellEventArgs e)
|
{
|
|
}
|
|
private void grdMain_CellBeginEdit(object sender, DataGridViewCellCancelEventArgs e)
|
{
|
int i = grdMain.CurrentCell.ColumnIndex;
|
|
//string s = DBUtility.ClsPub.isStrNull(grdMain.Columns[i].HeaderText);
|
//if (s == "叫料数量" || s == "退料数量")
|
//{
|
// e.Cancel = false;
|
//}
|
//else
|
//{
|
e.Cancel = true;
|
//}
|
}
|
|
private void cmdHMaterID2_Click(object sender, EventArgs e)
|
{
|
SCM.ClsCLD_Material_View oMater = new SCM.ClsCLD_Material_View();
|
string MaWhere = "";
|
MaWhere = " and HUSEORGID = " + ClsPub1.HOrgID;
|
if (oMater.RefreshView(MaWhere))
|
{
|
this.txtHMaterID2.Text = oMater.omodel.HNumber;
|
this.txtHMaterID2.Tag = oMater.omodel.HItemID.ToString();
|
this.txtHMaterName2.Text = oMater.omodel.HName;
|
this.txtHMaterModel2.Text = oMater.omodel.HModel;
|
}
|
else
|
{
|
this.txtHMaterID2.Text = "";
|
this.txtHMaterID2.Tag = 0;
|
this.txtHMaterName2.Text = "";
|
this.txtHMaterModel2.Text = "";
|
}
|
}
|
|
private void cmdHMaterID_Click(object sender, EventArgs e)
|
{
|
SCM.ClsCLD_Material_View oMater = new SCM.ClsCLD_Material_View();
|
//if (oMater.RefreshView())
|
//{
|
// this.txtHMaterID.Text = oMater.omodel.HNumber;
|
// this.txtHMaterID.Tag = oMater.omodel.HItemID.ToString();
|
// this.txtHMaterName.Text = oMater.omodel.HName;
|
// this.txtHMaterModel.Text = oMater.omodel.HModel;
|
//}
|
//else
|
//{
|
// this.txtHMaterID.Text = "";
|
// this.txtHMaterID.Tag = 0;
|
// this.txtHMaterName.Text = "";
|
// this.txtHMaterModel.Text = "";
|
//}
|
}
|
|
private void cmdHDeptID_Click(object sender, EventArgs e)
|
{
|
SCM.ClsCLD_Department_View oDept = new SCM.ClsCLD_Department_View();
|
string DeWhere = "";
|
DeWhere = " and HUSEORGID = " + ClsPub1.HOrgID;
|
if (oDept.RefreshView(DeWhere))
|
{
|
this.txtHDeptID.Text = oDept.omodel.HName;
|
this.txtHDeptID.Tag = oDept.omodel.HItemID.ToString();
|
}
|
else
|
{
|
this.txtHDeptID.Text = "";
|
this.txtHDeptID.Tag = 0;
|
}
|
}
|
|
private void sp_Click(object sender, EventArgs e)
|
{
|
|
//oFrmBZJ = new JIT_CallGoodsBill();
|
//oFrmBZJ.ShowDialog();
|
}
|
//单据完整性判断 未完成
|
private bool Sub_AllowSave()
|
{
|
//必输项目是否为空
|
//if (DBUtility.ClsPub.isLong(txtHDeptID.Tag) == 0)
|
//{
|
// MessageBox.Show("生产车间没有选择!", "提示");
|
// return false;
|
//}
|
//单据号是否重复
|
//if (BillNew.IsExistBillNo(ref ClsPub.sExeReturnInfo, txtHBillNo.Text.Trim(), BillStatus, BillOld.omodel.HInterID))
|
//{
|
// MessageBox.Show("单据号重复!不允许保存!", "提示");
|
// return false;
|
//}
|
//明细表是否为零行a
|
bool b = false;
|
//for (int i = 0; i < grdMain.RowCount; i++)
|
//{
|
// if (!IsNullRow(i))
|
// {
|
// b = true;
|
// break;
|
// }
|
//}
|
//if (b == false)
|
//{
|
// MessageBox.Show("表体明细行不存在!请录入!", "提示");
|
// return false;
|
//}
|
return true;
|
}
|
private void BG_Click(object sender, EventArgs e)
|
{
|
//WMSWeb.ClsJIT_CallGoodsBillSub_CLD oBillSub = new WMSWeb.ClsJIT_CallGoodsBillSub_CLD();
|
////判断权限
|
////if (!ClsPub.Security_Log(ModRightNameEdit, 1, true, DBUtility.ClsPub.CurUserName))
|
////{
|
//// return false;
|
////}
|
////
|
//Int32 i;
|
//bool bResult;
|
////BillNew = new DAL.ClsJIT_CallGoodsBill_CLD();
|
////失去焦点
|
//lblCaption.Focus();
|
//if (!Sub_AllowSave())//单据完整性判断
|
//{
|
// return;
|
//}
|
////赋值ID
|
////if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
|
//// BillNew.omodel.HInterID = BillOld.omodel.HInterID;
|
////else if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_UpdatePrice)
|
//// BillNew.omodel.HInterID = BillOld.omodel.HInterID;
|
////主类赋值
|
////判断会计期是否合理
|
//string s = "";
|
//int sYear = 0;
|
//int sPeriod = 0;
|
////if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(dtpHDate.Value, ref sYear, ref sPeriod, ref s) == false)
|
////{
|
//// MessageBox.Show(s, "提示");
|
//// return false;
|
////}
|
////if (ClsPub.Sub_GetPeriodByDate(ClsPub.isDate(dtpHDate.Value, 0), ref sYear, ref sPeriod))
|
////{
|
//// if (!(sYear * 100 + sPeriod >= ClsPub.CurYear * 100 + ClsPub.CurPeriod))
|
//// {
|
//// MessageBox.Show("您选择的日期的会计期间已结账!请与管理员联系", "提示");
|
//// return false;
|
//// }
|
////}
|
////else
|
////{
|
//// MessageBox.Show("您选择的日期不属于合理的会计期间!请与管理员联系", "提示");
|
//// return false;
|
////}
|
////判断是否启用控制
|
|
////判断是否结案,是否执行计划
|
|
////
|
|
//int CurRows = 0;
|
//for ( i = 0; i < grdMain.SelectedRows.Count; i++)
|
//{
|
// CurRows = grdMain.SelectedRows[i].Index;
|
// omodel.HYear = sYear;
|
// BillNew.omodel.HPeriod = sPeriod;
|
// //固定赋值=================================
|
// BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim(); //在赋值类前就处理好字符串和数字
|
// BillNew.omodel.HDate = DateTime.Today;
|
// //BillNew.omodel.HRemark = this.txtHRemark.Text.Trim();
|
// //BillNew.omodel.HBacker = "";
|
// //BillNew.omodel.HBackDate = "";
|
// //BillNew.omodel.HCheckDate = DBUtility.ClsPub.isDate(this.txtHCheckDate.Text);
|
// //BillNew.omodel.HChecker = this.txtHChecker.Text;
|
// BillNew.omodel.HMaker = DBUtility.ClsPub.CurUserName;
|
// BillNew.omodel.HMakeDate = DateTime.Today;
|
// BillNew.omodel.HUpDater = "";
|
// BillNew.omodel.HUpDateDate = "";
|
// //BillNew.omodel.HCloseMan = this.txtHCloseMan.Text;
|
// //BillNew.omodel.HCloseDate = DBUtility.ClsPub.isDate(this.txtHCloseDate.Text);
|
// BillNew.omodel.HCloseType = false;
|
// //BillNew.omodel.HDeleteMan = this.txtHDeleteMan.Text;
|
// //BillNew.omodel.HDeleteDate = DBUtility.ClsPub.isDate(this.txtHDeleteDate.Text);
|
// //BillNew.omodel.HMainSourceBillNo = this.txtHBillNo.Text.Trim();
|
// //BillNew.omodel.HMainSourceBillType = "";
|
// //====================================================
|
// //BillNew.omodel.HDeptID = ClsPub.isLong(this.txtHDeptID.Tag.ToString());
|
// //BillNew.omodel.HDeptNumber = ClsPub.isStrNull(this.txtHDeptID.Text);
|
// //BillNew.omodel.HEmpID = ClsPub.isLong(this.txtHEmpID.Tag.ToString());
|
// //BillNew.omodel.HEmpNumber = ClsPub.isStrNull(this.txtHEmpID.Text);
|
// //BillNew.omodel.HGroupID = ClsPub.isLong(this.txtHGroupID.Tag.ToString());
|
// //明细类赋值
|
// BillNew.DetailColl = new List<SCM.ClsJIT_CallGoodsBillSub_CLD>();
|
// //for (i = 0; i <= grdMain.RowCount - 1; i++)
|
// //{
|
// if (ClsPub.isLong(grdMain.Rows[CurRows].Cells[HMaterialIDCol].Value) != 0)
|
// {
|
// Model.ClsJIT_CallGoodsBillSub_CLD oSub = new Model.ClsJIT_CallGoodsBillSub_CLD();
|
// //固定赋值========================================
|
// oSub.HEntryID = i + 1;
|
// //oSub.HRemark = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HRemarkCol].Value);
|
// oSub.HSourceInterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSourceInterIDCol].Value);
|
// oSub.HSourceEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSourceEntryIDCol].Value);
|
// oSub.HSourceBillType = "88";
|
// oSub.HSourceBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HSourceBillNoCol].Value);
|
|
// //oSub.HRelationQty = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HRelationQtyCol].Value);
|
// //oSub.HRelationMoney = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HRelationMoneyCol].Value);
|
// //oSub.HCloseMan = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HCloseManCol].Value);
|
// //oSub.HEntryCloseDate = DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEntryCloseDateCol].Value);
|
// //oSub.HCloseType = DBUtility.ClsPub.isBool(grdMain.Rows[i].Cells[HCloseTypeCol].Value);
|
// //=============================
|
// oSub.HQty = DBUtility.ClsPub.isDoule(grdMain.Rows[CurRows].Cells[HBHGQtyCol].Value);
|
// if (oSub.HQty <= 0)
|
// {
|
// MessageBox.Show("第" + ClsPub.isStrNull(i + 1) + "行,叫料数量不能为0或者小于0");
|
// return;
|
// }
|
// //oSub.HQtyMust = DBUtility.ClsPub.isDoule(grdMain.Rows[i].Cells[HQtyMustCol].Value);
|
// oSub.HMaterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HMaterialIDCol].Value);
|
// oSub.HMaterNumber = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HMaterialNumberCol].Value);
|
// oSub.HModel = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HMaterialModelCol].Value);
|
// //oSub.HDeptID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HDeptIDCol].Value);
|
// //oSub.HDeptName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HDeptNameCol].Value);
|
// oSub.HWHID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HWHIDCol].Value);
|
// //oSub.HWHName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HWHNameCol].Value);
|
// //oSub.HSPName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HSPNameCol].Value);
|
// //oSub.HProcName = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HProcNameCol].Value);
|
// oSub.HSPID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HSPIDCol].Value);
|
// oSub.HProcID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HProcIDCol].Value);
|
// //
|
// oSub.HICMOBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[CurRows].Cells[HICMOBillNoCol].Value);
|
// oSub.HICMOInterID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HICMOInterIDCol].Value);
|
// oSub.HICMOEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[CurRows].Cells[HICMOEntryIDCol].Value);
|
// //oSub.HSeOrderInterID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderInterIDCol].Value);
|
// //oSub.HSeOrderEntryID = DBUtility.ClsPub.isLong(grdMain.Rows[i].Cells[HSeOrderEntryIDCol].Value);
|
// //oSub.HSeOrderBillNo = DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HSeOrderBillNoCol].Value);
|
// oSub.HPlanQty = DBUtility.ClsPub.isDoule(grdMain.Rows[CurRows].Cells[HPlanQtyCol].Value);
|
// BillNew.DetailColl.Add(oSub);
|
// //}
|
// //}
|
// }
|
// //保存完毕后处理
|
// //if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew)
|
// //{
|
// bResult = BillNew.AddBill(ref ClsPub.sExeReturnInfo);
|
// //}
|
// //else
|
// //{
|
// // bResult = BillNew.ModifyBill(BillNew.omodel.HInterID, ref ClsPub.sExeReturnInfo);
|
// //}
|
// //提示
|
// if (bResult == true)
|
// {
|
// //BillChange = true;
|
// Display();
|
// MessageBox.Show("单据存盘完毕!单据号:" + this.txtHBillNo.Text.Trim(), "提示");
|
// //if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_AddNew)
|
// //{
|
// // BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
|
// BillOld.omodel.HInterID = BillNew.omodel.HInterID;
|
// // this.Sub_ShowBill();
|
// //}
|
// //else if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
|
// //{
|
// // BillStatus = DBUtility.ClsPub.Enum_BillStatus.BillStatus_View;
|
// //}
|
// //this.Sub_OperStatus();
|
// return;
|
// }
|
// else
|
// {
|
// MessageBox.Show("保存失败!原因:" + ClsPub.sExeReturnInfo, "提示");
|
// return;
|
// }
|
//}
|
}
|
|
private void qxbg_Click(object sender, EventArgs e)
|
{
|
|
//oFrmJJ = new JIT_CallJinJiBill();
|
//oFrmJJ.ShowDialog();
|
}
|
|
private void button1_Click(object sender, EventArgs e)
|
{
|
//oFrmFL = new JIT_CallFLGoodsBill();
|
//oFrmFL.ShowDialog();
|
}
|
|
private void button3_Click(object sender, EventArgs e)
|
{
|
|
}
|
}
|
}
|