Esempio n. 1
0
        private void btn_ok_Click(object sender, EventArgs e)
        {
            DataTable        dt      = dgvBillDetail.DataSource as DataTable;
            PSettlementClass psClass = new PSettlementClass();

            //psClass.ScId = Convert.ToInt64(this.cbxContractNO.SelectedValue.ToString());
            //psClass.InputMan = this.userName;
            //psClass.Sum = Convert.ToDecimal(txtMoney.Text.Trim().ToString());
            //psClass.TotalWeight = Convert.ToDecimal(txtQuantity.Text.Trim().ToString());
            //psClass.Count = Convert.ToInt64(txtCount.Text.Trim().ToString());

            if (dt == null)
            {
                MessageBox.Show("无核算票据信息,无法进行核算,请打描或输入票据条码!");
                return;
            }
            else
            {
                psClass.ScId        = Convert.ToInt64(this.cbxContractNO.SelectedValue.ToString());
                psClass.InputMan    = this.userName;
                psClass.Sum         = Convert.ToDecimal(txtMoney.Text.Trim().ToString());
                psClass.TotalWeight = Convert.ToDecimal(txtQuantity.Text.Trim().ToString());
                psClass.Count       = Convert.ToInt64(txtCount.Text.Trim().ToString());

                if (salesCLogic.InsertSPSettlement(psClass, this.userName, dgvInvoice, dgvBillDetail))
                {
                    this.DialogResult = DialogResult.OK;
                    this.Close();
                }
                else
                {
                    MessageBox.Show("无法进行核算,请重新进行核算!");
                    return;
                }
            }
        }
Esempio n. 2
0
 /*
  * 方法名称:InsertSPSettlement()
  * 方法功能描述:向销售核算表中插入核算记录.
  *
  * 创建人:冯雪
  * 创建时间:2009-03-17
  *
  * 修改人:
  * 修改时间:
  * 修改内容:
  *
  */
 public bool InsertSPSettlement(PSettlementClass psClass, string username, DataGridView dgvMain, DataGridView dgvDetail)
 {
     return(salesSDB.InsertSPSettlement(psClass, username, dgvMain, dgvDetail));
 }