示例#1
0
 public Frm_SetDay(Frm_FQC mfrm)
 {
     InitializeComponent();
     frm = mfrm;
 }
示例#2
0
        private void dgv_showdata_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                //判定是哪个FROM需要
                if (mFrm is fFacDeptInfo)
                {
                    (mFrm as fFacDeptInfo).edtuserId.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
                if (mFrm is formworkshop)
                {
                    (mFrm as formworkshop).textuserid.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
                if (mFrm is line_set)
                {
                    (mFrm as line_set).txt_userid.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
                if (mFrm is Frmwarehouse)
                {
                    (mFrm as Frmwarehouse).tb_storeman.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
                //if (mFrm is Print5in1label)
                //{

                //    (mFrm as Print5in1label).cblocal.Text = "";
                //    (mFrm as Print5in1label).cblocal.SelectedText = this.dgv_showdata["locId", e.RowIndex].Value.ToString();
                //    (mFrm as Print5in1label).cb_store.Text = "";
                //    (mFrm as Print5in1label).cb_store.SelectedText = this.dgv_showdata["storehouseId", e.RowIndex].Value.ToString();
                //    this.DialogResult = DialogResult.OK;
                //    return;
                //}

                //if (mFrm is FrmPallet)
                //{
                //    if ((mFrm as FrmPallet).Line == true)
                //    {
                //        (mFrm as FrmPallet).LineName = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                //        (mFrm as FrmPallet).LineCode = "S1";
                //    }
                //    else
                //        if ((mFrm as FrmPallet).Craft == true)
                //        {
                //           // (mFrm as FrmPallet).LabConfig.Text = "线体: " + (mFrm as FrmPallet).LineName + "  --  途程: " + this.dgv_showdata[1, e.RowIndex].Value.ToString();

                //            (mFrm as FrmPallet).CraftName = this.dgv_showdata[1, e.RowIndex].Value.ToString();
                //        }

                //    this.DialogResult = DialogResult.OK;
                //    return;
                //}

                //if (mFrm is FrmStockIn)
                //{
                //    if ((mFrm as FrmStockIn).Line == true)
                //    {
                //        (mFrm as FrmStockIn).LineName = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                //    }
                //    else
                //    {
                //        (mFrm as FrmStockIn).LabConfig.Text = "线体: " + (mFrm as FrmStockIn).LineName + "  --  途程: " + this.dgv_showdata[1, e.RowIndex].Value.ToString();
                //        (mFrm as FrmStockIn).CraftId = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                //        (mFrm as FrmStockIn).CraftName = this.dgv_showdata[1, e.RowIndex].Value.ToString();
                //    }

                //    this.DialogResult = DialogResult.OK;
                //    return;
                //}

                //if (mFrm is Frm_StockReceive)
                //{
                //    if (dgv_showdata.Columns.Count == 2 && e.RowIndex != -1 && e.ColumnIndex != -1)
                //    {
                //        dgv_showdata.DataSource = mDatatable = FrmBLL.ReleaseData.arrByteToDataTable(
                //            RefWebService_BLL.refWebtStorehouseManage.Instance.GetLotIdByStorehouseId(
                //            dgv_showdata["仓库编号", e.RowIndex].Value.ToString()));
                //        ShowButton();

                //    }
                //    else
                //    {
                //        (mFrm as Frm_StockReceive).txtlocid.Text = "";
                //        (mFrm as Frm_StockReceive).txtlocid.Text = this.dgv_showdata["库位编号", e.RowIndex].Value.ToString();
                //        (mFrm as Frm_StockReceive).txtstore.Text = "";
                //        (mFrm as Frm_StockReceive).txtstore.Text = this.dgv_showdata["仓库编号", e.RowIndex].Value.ToString();
                //        this.DialogResult = DialogResult.OK;
                //        return;
                //    }
                //}

                //if (mFrm is Frm_Receiving_Storage)
                //{
                //    //if (dgv_showdata.Columns.Count == 2 && e.RowIndex != -1 && e.ColumnIndex != -1)
                //    //{
                //    //    dgv_showdata.DataSource = mDatatable = FrmBLL.ReleaseData.arrByteToDataTable(
                //    //        RefWebService_BLL.refWebtStorehouseManage.Instance.GetLotIdByStorehouseId(
                //    //        dgv_showdata["仓库编号", e.RowIndex].Value.ToString()));
                //    //    ShowButton();

                //    //}
                //    //else
                //    //{
                //        (mFrm as Frm_Receiving_Storage).txtlocid.Text = "NA";
                //      //  (mFrm as Frm_Receiving_Storage).txtlocid.Text = this.dgv_showdata["库位编号", e.RowIndex].Value.ToString();
                //        (mFrm as Frm_Receiving_Storage).txtstore.Text = "";
                //        (mFrm as Frm_Receiving_Storage).txtstore.Text = this.dgv_showdata["仓库编号", e.RowIndex].Value.ToString();
                //        this.DialogResult = DialogResult.OK;
                //        return;
                //  //  }
                //}

                if (mFrm is ManageRoute)
                {
                    (mFrm as ManageRoute).tb_partnumber.Text  = this.dgv_showdata["partnumber", e.RowIndex].Value.ToString();
                    (mFrm as ManageRoute).tb_productname.Text = this.dgv_showdata["productname", e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }

                //if (mFrm is Frm_ProductOut)
                //{
                //    Frm_ProductOut po = mFrm as Frm_ProductOut;
                //    if (po.mFlag == "0")
                //    {
                //        (mFrm as Frm_ProductOut).txtCustomerId.Text = "";
                //        (mFrm as Frm_ProductOut).txtCustomerId.Text = this.dgv_showdata["storehouseId", e.RowIndex].Value.ToString();
                //        this.DialogResult = DialogResult.OK;
                //        return;
                //    }
                //    if (po.mFlag == "1")
                //    {
                //        (mFrm as Frm_ProductOut).tb_customerid.Text = "";
                //        (mFrm as Frm_ProductOut).tb_customerid.Text = this.dgv_showdata["storehouseId", e.RowIndex].Value.ToString();
                //        this.DialogResult = DialogResult.OK;
                //        return;
                //    }

                //}
                if (mFrm is FrmRepair)
                {
                    (mFrm as FrmRepair).cbreasoncode.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                    (mFrm as FrmRepair).tbrcdesc.Text     = this.dgv_showdata[2, e.RowIndex].Value.ToString();
                    this.DialogResult = DialogResult.OK;
                    return;
                }
                if (mFrm is Frm_FQC)
                {
                    Frm_FQC po = mFrm as Frm_FQC;
                    if (po.mFlag == "0")
                    {
                        (mFrm as Frm_FQC).cbreasoncode.Text = this.dgv_showdata[0, e.RowIndex].Value.ToString();
                        (mFrm as Frm_FQC).tbrcdesc.Text     = this.dgv_showdata[2, e.RowIndex].Value.ToString();
                        this.DialogResult = DialogResult.OK;
                        return;
                    }
                    if (po.mFlag == "1")
                    {
                        (mFrm as Frm_FQC).Lab_Craft.Text = this.dgv_showdata[1, e.RowIndex].Value.ToString();
                        po.CraftId        = this.dgv_showdata[1, e.RowIndex].Value.ToString();
                        this.DialogResult = DialogResult.OK;
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBoxEx.Show(ex.Message);
            }
        }
示例#3
0
 public Frm_Sel_Info(Frm_FQC f)
 {
     InitializeComponent();
     frm = f;
 }