| | |
| | | using System.Text; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace WarM.ä»åºç®¡ç |
| | | namespace WarM |
| | | { |
| | | public partial class Gy_BarCodeBill_ChaiMa : Form |
| | | { |
| | |
| | | oSumGrid_Pay.NoCol = HSnoCol2; |
| | | } |
| | | |
| | | #region çªä½å¤çæ¹æ³ |
| | | #region çªä½å¤çæ¹æ³ |
| | | //åå§å页ç¾1æ°æ® |
| | | private void intoDate() |
| | | { |
| | | try |
| | | { |
| | | DataSet Ds; |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Ds = oCn.RunProcReturn("select * from h_v_Gy_BarCodeBill_ChaiMa", "h_v_Gy_BarCodeBill_ChaiMa"); |
| | | grdMain.DataSource = Ds.Tables[0].DefaultView; |
| | | |
| | | } |
| | | catch (Exception ex ) |
| | | { |
| | | MessageBox.Show(ex.Message.ToString()); |
| | | } |
| | | |
| | | } |
| | | |
| | | //åå§å页ç¾1 |
| | | private void initGrid() |
| | |
| | | ////éèå |
| | | grdMain.Columns[HTagCol].Visible = false; |
| | | grdMain.Columns[HInterID].Visible = false; |
| | | //设置å¯ç¼è¾å |
| | | string sAllowCol = HNum.ToString(); |
| | | //设置å计å |
| | | string sTotalCol = HTagCol.ToString() + "0"; |
| | | |
| | | //intoDate(); |
| | | //æ ¼å¼åç½æ ¼ |
| | | //DBUtility.Xt_BaseBillFun.initGridLast(sAllowCol, sTotalCol, oSumGrid_Mater); |
| | | } |
| | |
| | | Sub_ClearBill(); |
| | | } |
| | | |
| | | //æ°æ®éªè¯ |
| | | private bool Sub_AllowSave() |
| | | { |
| | | for (int i = 0; i <= grdMain_Pay.RowCount - 1; i++) |
| | | { |
| | | if (ClsPub.isLong(grdMain_Pay.Rows[i].Cells[HSnoCol2].Value) != 0) |
| | | { |
| | | if (ClsPub.isStrNull(grdMain_Pay.Rows[i].Cells[HNum2].Value) ==null) |
| | | { |
| | | MessageBox.Show("请å°è¡¨æ ¼æåæ°éå¡«å宿´", "æç¤º"); |
| | | return false; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | ////æ°æ®éªè¯ |
| | | //private bool Sub_AllowSave() |
| | | //{ |
| | | // for (int i = 0; i <= grdMain_Pay.RowCount - 1; i++) |
| | | // { |
| | | // if (ClsPub.isLong(grdMain_Pay.Rows[i].Cells[HSnoCol2].Value) != 0) |
| | | // { |
| | | // if (ClsPub.isStrNull(grdMain_Pay.Rows[i].Cells[HNum2].Value) ==null) |
| | | // { |
| | | // MessageBox.Show("请å°è¡¨æ ¼æåæ°éå¡«å宿´", "æç¤º"); |
| | | // return false; |
| | | // } |
| | | // } |
| | | // else |
| | | // { |
| | | // return true; |
| | | // } |
| | | // } |
| | | // return true; |
| | | //} |
| | | |
| | | //çææé® |
| | | private void xz_Click(object sender, EventArgs e) |
| | |
| | | //夿ä¼è®¡ææ¯å¦åç |
| | | string HBillNo = txtHBillNo.Text; |
| | | DataSet Ds; |
| | | double sum = 0; |
| | | double sum = 0.00000000; |
| | | SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); |
| | | Ds = oCn.RunProcReturn("select top 1* from Gy_BarCodeBill where HBarCode='" + HBillNo + "'", "h_v_Gy_BarCodeBill_ChaiMa"); |
| | | for (i = 0; i <= grdMain_Pay.RowCount - 1; i++) |
| | |
| | | break; |
| | | } |
| | | } |
| | | if (sum > DBUtility.ClsPub.isLong(grdMain.Rows[0].Cells[HQty].Value)) |
| | | if (sum > DBUtility.ClsPub.isDoule(grdMain.Rows[0].Cells[HQty].Value)) |
| | | { |
| | | MessageBox.Show("页2æåæ°éä¹åå¿
é¡»å°äºæ¡ç æ°éï¼"); |
| | | return false; |