private void btn编辑_Click(object sender, EventArgs e)
        {
            if (gridView发货计划列表.FocusedRowHandle > -1)
            {
                var rowIndex = gridView发货计划列表.GetDataSourceRowIndex(gridView发货计划列表.FocusedRowHandle);
                var rowData  = _dataSrouce[rowIndex];

                string billno = gridView发货计划列表.GetRowCellValue(gridView发货计划列表.FocusedRowHandle, "FBILLNO").ToStr();
                if (!string.IsNullOrEmpty(billno))
                {
                    //进入发货计划编辑
                    FrmPPPImmediateSendGoods frm = new FrmPPPImmediateSendGoods();
                    frm.IcseoutbillModel  = rowData;
                    frm.IcseoutbillEntrys = new List <V_ICSEOUTBILLENTRYMODEL>(gridControl发货计划明细.DataSource as V_ICSEOUTBILLENTRYMODEL[]);
                    frm.SaveAfter        += new EventHandler(FrmPPPImmediateSendGoods_SaveAfter);
                    frm.Show();
                    //if (frm.ShowDialog() == DialogResult.OK)
                    //{
                    //    this.onSearch();
                    //}
                }
                else
                {
                    //进入组柜编辑
                    FrmSGPGroupCounter frm = new FrmSGPGroupCounter();
                    frm.IcseoutbillModel = rowData;
                    frm.SaveAfter       += new EventHandler(FrmPPPImmediateSendGoods_SaveAfter);
                    frm.Show();
                    //if (frm.ShowDialog() == DialogResult.OK)
                    //{
                    //    this.onSearch();
                    //}
                }
            }
        }
Exemplo n.º 2
0
        private void btn直接发货_Click(object sender, EventArgs e)
        {
            try
            {
                if (gridView请购计划列表.FocusedRowHandle > -1)
                {
                    int status = gridView请购计划列表.GetRowCellValue(gridView请购计划列表.FocusedRowHandle, "FSTATUS").ToInt();
                    if (status != 7)
                    {
                        MsgHelper.ShowInformation("单据未确认,无法发货!");
                        return;
                    }

                    var list = gridView请购计划列表.DataSource as V_ICPRBILLMODEL[];

                    FrmPPPImmediateSendGoods frm = new FrmPPPImmediateSendGoods();
                    frm.请购计划Data   = list[gridView请购计划列表.GetDataSourceRowIndex(gridView请购计划列表.FocusedRowHandle)];
                    frm.请购计划明细Data = this.gridView请购计划明细.DataSource as hn.DataAccess.Model.V_ICPRBILLENTRYMODEL[];
                    frm.SaveAfter += Frm_SaveAfter1;
                    frm.Show();
                }
                else
                {
                    MsgHelper.ShowInformation("请选择你要发货的数据!");
                }
            }
            catch (Exception ex)
            {
                LogError(ex);
            }
        }
        private void btn新增_Click(object sender, EventArgs e)
        {
            FrmPPPImmediateSendGoods frm = new FrmPPPImmediateSendGoods();

            frm.SaveAfter += new EventHandler(FrmPPPImmediateSendGoods_SaveAfter);
            frm.Show();
            //if (frm.ShowDialog() == DialogResult.OK)
            //{
            //    this.onSearch();
            //}
        }
        private void btn发货_Click(object sender, EventArgs e)
        {
            int status = ICPRBILLData.FSTATUS;

            if (status != 7)
            {
                MsgHelper.ShowInformation("单据未确认,无法发货!");
                return;
            }


            FrmPPPImmediateSendGoods frm = new FrmPPPImmediateSendGoods();

            frm.请购计划Data   = this.ICPRBILLData;
            frm.请购计划明细Data = this.gridView请购计划明细.DataSource as hn.DataAccess.Model.V_ICPRBILLENTRYMODEL[];
            frm.SaveAfter += Frm_SaveAfter;
            frm.Show();
        }