1
wtt
2 天以前 5d6ef78ab0af758419058f3e2e756c3d5d500110
WarM/²Ö¿â¹ÜÀí/Kf_SellOutBill_BarCodeNote.cs
@@ -29,6 +29,7 @@
        public Int64 HStockOrgID = DBUtility.ClsPub.HOrgID;
        public DateTime HDate = DateTime.Today;
        public DBUtility.ClsPub.Enum_BillStatus BillStatus;
        public DAL.ClsKf_SellOutBill BillOld = new DAL.ClsKf_SellOutBill();   //对应单据类
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN();
        #region  //固定代码
@@ -324,6 +325,8 @@
                txtHMoney.Text = DSet.Tables[0].Rows[0]["本单金额"].ToString();
                txtHCreditDifference.Text = DSet.Tables[0].Rows[0]["信用差额"].ToString();
                HInterID = DBUtility.ClsPub.isLong(DSet.Tables[0].Rows[0]["HInterID"]);
                txtHMaker.Text = DSet.Tables[0].Rows[0]["制单人"].ToString();
                txtHChecker.Text = DSet.Tables[0].Rows[0]["审核人"].ToString();
                //返回基本信息、码单信息
                grdMain.DataSource = DSet.Tables[1].DefaultView;
@@ -338,28 +341,31 @@
                //画线
                GraphLine();
                //未审核
                if (cmbHBillStatus.Text == "已审核")
                {
                    sh.Enabled = false;
                    fsh.Enabled = true;
                    pic1.Visible = true;
                    pic1.Image = System.Drawing.Image.FromFile(DBUtility.ClsPub.AppPath + @"/Pic/Checked.jpg");
                }
                else if (cmbHBillStatus.Text == "已关闭")
                {
                    sh.Enabled = false;
                    fsh.Enabled = false;
                    pic1.Visible = true;
                    pic1.Image = System.Drawing.Image.FromFile(DBUtility.ClsPub.AppPath + @"/Pic/Closed.jpg");
                }
                else if (cmbHBillStatus.Text == "已作废")
                {
                    sh.Enabled = false;
                    fsh.Enabled = false;
                    pic1.Visible = true;
                    pic1.Image = System.Drawing.Image.FromFile(DBUtility.ClsPub.AppPath + @"/Pic/Deleted.jpg");
                }
                else
                {
                    sh.Enabled = true;
                    fsh.Enabled = false;
                    pic1.Visible = false;
                    pic1.Image = null;
                }
@@ -397,10 +403,40 @@
            else
            {
                cmbHBillStatus.Text="已审核";
                txtHChecker.Text = HMaker.ToString();
                sh.Enabled = false;
                fsh.Enabled = true;
                pic1.Visible = true;
                pic1.Image = System.Drawing.Image.FromFile(DBUtility.ClsPub.AppPath + @"/Pic/Checked.jpg");
                MessageBox.Show("审核成功!", "提示");
                return;
            }
        }
        #endregion
        #region  //反审核销售出库单
        private void fsh_Click(object sender, EventArgs e)
        {
            if(HInterID==0)
            {
                MessageBox.Show("请先选择对应销售出库单!", "提示");
                return;
            }
            if (BillOld.AbandonCheck(HInterID, ref DBUtility.ClsPub.sExeReturnInfo) == true)
            {
                cmbHBillStatus.Text = "创建";
                txtHChecker.Text = "";
                sh.Enabled = true;
                fsh.Enabled = false;
                pic1.Visible = false;
                pic1.Image = null;
                MessageBox.Show("反审核成功!", "提示");
                return;
            }
            else
            {
                MessageBox.Show("反审核失败!原因:" + DBUtility.ClsPub.sExeReturnInfo, "提示");
                return;
            }
        }
@@ -478,6 +514,8 @@
                Report.FieldByName("单据状态").AsString = cmbHBillStatus.Text;
                Report.FieldByName("本单金额").AsString = txtHMoney.Text;
                Report.FieldByName("信用差额").AsString = txtHCreditDifference.Text;
                Report.FieldByName("制单人").AsString = txtHMaker.Text;
                Report.FieldByName("审核人").AsString = txtHChecker.Text;
            }
            catch (Exception e)
            {
@@ -505,11 +543,11 @@
        private void BarCodedy_Click(object sender, EventArgs e)
        {
            if (cmbHBillStatus.Text != "已审核")
            {
                MessageBox.Show("所选单据对应单据状态不为‘已审核’状态,不允许打印!", "提示");
                return;
            }
            //if (cmbHBillStatus.Text != "已审核")
            //{
            //    MessageBox.Show("所选单据对应单据状态不为‘已审核’状态,不允许打印!", "提示");
            //    return;
            //}
            //选择打印模板
            BLL.Gy_OpenTmp oFrm = new BLL.Gy_OpenTmp();
            oFrm.sBillName = ModName;
@@ -559,6 +597,8 @@
                Report.FieldByName("单据状态").AsString = cmbHBillStatus.Text;
                Report.FieldByName("本单金额").AsString = txtHMoney.Text;
                Report.FieldByName("信用差额").AsString = txtHCreditDifference.Text;
                Report.FieldByName("制单人").AsString = txtHMaker.Text;
                Report.FieldByName("审核人").AsString = txtHChecker.Text;
            }
            catch (Exception e)
            {