yangle
2023-05-24 b129762a4bb5ec2cde5edf16bc9cbda57c73587d
WorkM/Á÷ת¿¨¹ÜÀí/MES_StationEntrustInBill.cs
@@ -525,8 +525,18 @@
            if (BillStatus == DBUtility.ClsPub.Enum_BillStatus.BillStatus_Modify)
                BillNew.omodel.HInterID = BillOld.omodel.HInterID;
            //主类赋值
            BillNew.omodel.HYear = 2011;
            BillNew.omodel.HPeriod = 1;
            //判断会计期是否合理
            string s = "";
            int sYear = 0;
            int sPeriod = 0;
            if (DBUtility.Xt_BaseBillFun.Fun_AllowYearPeriod(DBUtility.ClsPub.isDate(this.txtHStationInTime.Text), ref sYear, ref sPeriod, ref s) == false)
            {
                MessageBox.Show(s, "提示");
                return false;
            }
            //
            BillNew.omodel.HYear = sYear;
            BillNew.omodel.HPeriod = sPeriod;
            BillNew.omodel.HBillNo = this.txtHBillNo.Text.Trim();
            BillNew.omodel.HInnerBillNo = this.txtHInnerBillNo.Text.Trim();
            BillNew.omodel.HICMOBillNo = this.txtHICMOBillNo.Text.Trim();
@@ -1182,6 +1192,7 @@
            if (e.KeyCode == Keys.Enter)
            {
                cmdOK.Select();
                txtHWWWorkOrderBillNo.Focus();
            }
        }
@@ -1332,23 +1343,23 @@
                    MessageBox.Show("没有录入流转卡号或者流水号");
                    return;
                }
                //根据工号获取委外工单 åŠå†…码,子内码
                SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                DataSet ds;
                ds = oCn.RunProcReturn("exec  h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
                if (ds == null)
                {
                    MessageBox.Show("没有找到对应的委外工单!");
                    return;
                }
                if (ds.Tables[0].Rows.Count > 0)
                {
                    txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
                    lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
                    lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
                    txtHWWWorkOrderBillNo.Enabled = false;
                }
                ////根据工号获取委外工单 åŠå†…码,子内码
                //SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
                //DataSet ds;
                //ds = oCn.RunProcReturn("exec  h_p_WW_GetWWWorkBillInfoByNo '" + txtHWWWorkOrderBillNo.Text + "'," + lngBillKey.ToString() + "," + lngBillSubKey.ToString(), "h_p_WW_GetWWWorkBillInfoByNo");
                //if (ds == null)
                //{
                //    MessageBox.Show("没有找到对应的委外工单!");
                //    return;
                //}
                //if (ds.Tables[0].Rows.Count > 0)
                //{
                //    txtHWWWorkOrderBillNo.Text = DBUtility.ClsPub.isStrNull(ds.Tables[0].Rows[0]["HBillNo"]);
                //    lngBillKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HInterID"]);
                //    lngBillSubKey_WW = DBUtility.ClsPub.isLong(ds.Tables[0].Rows[0]["HEntryID"]);
                //    txtHWWWorkOrderBillNo.Enabled = false;
                //}
                txtHRemark.Focus();
            }
        }
@@ -1472,5 +1483,6 @@
        {
            this.Sub_AddBill();
        }
    }
}