/// <summary>
        /// 核销入库
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnVerificateIn_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();

            try
            {
                this.dataGridview.EndEdit();
                List<MatInfo> matInfos = new List<MatInfo>();
                ListModalForm listModalForm = new ListModalForm("01", "add", this.receiptId, "add_03_01");
                foreach (DataGridViewRow dgvr in dataGridview.Rows)
                {
                    if (dgvr.Cells["单据号"].Value == null || dgvr.Cells["物料编码"].Value == null)
                        continue;
                    string SStoreHId = (new DBUtil()).Get_Single_val("T_Receipt_Main", "SourceStoreH", "ReceiptId", dgvr.Cells["单据号"].Value.ToString().Trim());
                    MatInfo matInfo = new MatInfo();
                    if (dgvr.Cells["物料编码"].Value != null)
                        matInfo.matId = dgvr.Cells["物料编码"].Value.ToString().Trim();
                    if (dgvr.Cells["数量"].Value != null && dgvr.Cells["数量"].Value.ToString().Trim() != "")
                        matInfo.num = Convert.ToDouble(dgvr.Cells["数量"].Value.ToString().Trim());
                    if (dgvr.Cells["单价"].Value != null && dgvr.Cells["单价"].Value.ToString().Trim() != "")
                        matInfo.price = Convert.ToDouble(dgvr.Cells["单价"].Value.ToString().Trim());
                    if (dgvr.Cells["单据号"].Value != null && dgvr.Cells["单据号"].Value.ToString().Trim() != "")
                        matInfo.receiptId = dgvr.Cells["单据号"].Value.ToString().Trim();
                    if (dgvr.Cells["顺序号"].Value != null && dgvr.Cells["顺序号"].Value.ToString().Trim() != "")
                        matInfo.orderNo = Convert.ToInt32(dgvr.Cells["顺序号"].Value.ToString().Trim());
                    if (dgvr.Cells["类型"].Value != null && dgvr.Cells["类型"].Value.ToString().Trim() != "")
                        matInfo.matType = Convert.ToInt32(dgvr.Cells["类型"].Value.ToString().Trim());
                    matInfo.notVerNum = notVerNums[dgvr.Index];//未核销数量(修改前)
                    matInfo.SStoreHId = SStoreHId;

                    matInfos.Add(matInfo);
                }

                listModalForm.MdiParent = mainForm;
                listModalForm.matInfos_03 = matInfos;//
                listModalForm.Show();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                return;
            }
        }
Exemple #2
0
        void item_Click(object sender, EventArgs e)
        {
            ToolStripMenuItem item = sender as ToolStripMenuItem;
            if (item.DropDownItems.Count > 0) //有子菜单的菜单项,不处理
                return;

            string strReceTypeId = item.Name.Trim();
            ListModalForm listModalForm = new ListModalForm(strReceTypeId, "add", "", "");
            listModalForm.curWorkMonth = this.curWorkMonth;
            listModalForm.curUserId = this.userId;
            listModalForm.MdiParent = this;
            listModalForm.Show();
        }
 private void axGRDisplayViewer1_ContentCellDblClick(object sender, global::AxgrproLib._IGRDisplayViewerEvents_ContentCellDblClickEvent e)
 {
     //获取对应列的行头值
     string ReceiptId = Report.FieldByName("单据号").AsString;
     string ReceiptTypeId = Report.FieldByName("单据类别").AsString;
     if (ReceiptId == "") return;
     ListModalForm listModalForm = new ListModalForm(ReceiptTypeId, "edit", ReceiptId, "");
     listModalForm.MdiParent = this.MdiParent;
     listModalForm.Show();
 }
        /// <summary>
        /// 双击修改某一单据
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void dgvReceipt_Main_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (this.dgvReceipt_Main.SelectedRows.Count <= 0 || this.dgvReceipt_Main.SelectedRows[0].Cells["单据号"].Value == null)
                return;

            string ReceiptId = this.dgvReceipt_Main.SelectedRows[0].Cells["单据号"].Value.ToString().Trim();
            string ReceiptTypeId = (new DBUtil()).Get_Single_val("T_Receipt_Main", "ReceiptTypeID", "ReceiptId", ReceiptId);
            if (ReceiptTypeId == "")
                return;

            ListModalForm listModalForm = new ListModalForm(ReceiptTypeId, "edit", ReceiptId, "");
            listModalForm.curWorkMonth = this.curWorkMonth;
            listModalForm.MdiParent = this.MdiParent;
            listModalForm.Show();
        }
Exemple #5
0
 /// <summary>
 /// 新增
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void toolStripButtonAdd_Click(object sender, EventArgs e)
 {
     ListModalForm listModalForm = new ListModalForm(strReceTypeId, "add", "", "");
     listModalForm.MdiParent = this.MdiParent;
     listModalForm.Show();
 }