Пример #1
0
        //双击选择出库编号,(查询)
        private void txtOutput_codeSelect_DoubleClick(object sender, EventArgs e)
        {
            sellStorageDialogForm child = new sellStorageDialogForm("visit");

            child.ShowDialog();
            if (child.outputCode != string.Empty)
            {
                txtOutput_codeSelect.Text = child.outputCode;
            }
        }
Пример #2
0
        //双击选择出库编号
        private void txtApparatus_quality_output_code_DoubleClick(object sender, EventArgs e)
        {
            if (dataType == DataType.Insert)
            {
                sellStorageDialogForm child = new sellStorageDialogForm();
                child.ShowDialog();
                int sum = 0;
                if (child.outputCode != string.Empty)
                {
                    try
                    {
                        SearchParameter sp = new SearchParameter();

                        sp.SetValue(":apparatus_output_code", child.outputCode);

                        dataAccess = new DataAccess();
                        dataAccess.Open();

                        GetData   getData = new GetData(dataAccess.Connection);
                        DataTable dt      = getData.GetTableBySqlStr(Constants.SqlStr.SUM_TC_APPARATUS_QUALITY, sp);
                        if (dt != null && dt.Rows.Count != 0 && dt.Rows[0]["suncount"].ToString() != string.Empty)
                        {
                            sum = int.Parse(dt.Rows[0]["suncount"].ToString());
                        }
                    }
                    catch (Exception ex)
                    {
                        MessageBox.Show(ex.Message);
                        throw ex;
                    }
                    finally
                    {
                        dataAccess.Close();
                    }

                    txtApparatus_quality_output_code.Text = child.outputCode;
                    txtApparatus_goods_name.Text          = child.goodsName;
                    txtApparatus_supplier_name.Text       = child.supplierName;
                    txtApparatus_customer_name.Text       = child.customerName;
                    outputInstorageDate = child.outputInstorageDate;

                    int i = child.lastCount - sum;
                    labelSellcount.Text = i.ToString();
                    if (dataType == DataType.Update)
                    {
                        labelSellcount.Text = (i + int.Parse(dgv.SelectedRows[0].Cells["apparatus_quality_count"].Value.ToString())).ToString();
                    }
                }
            }
            else
            {
                return;
            }
        }
Пример #3
0
 //双击选择出库编号,(添加修改)
 private void txtOutput_code_DoubleClick(object sender, EventArgs e)
 {
     if (dataType == DataType.Insert || dataType == DataType.Update)
     {
         sellStorageDialogForm child = new sellStorageDialogForm("visit");
         child.ShowDialog();
         if (child.outputCode != string.Empty)
         {
             txtOutput_code.Text   = child.outputCode;
             txtCustomer_name.Text = child.customerName;
             txtGoods_name.Text    = child.goodsName;
             txtCustomer_Tel.Text  = child.customerTel;
             sellDate = child.outputInstorageDate;
         }
     }
 }