예제 #1
0
        private void 编辑ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (!PowerCheckCsClass.IfHasPower(LoginClass.LogID, CommFunction.GSYSNAME, sender, CommFunction.ConnectString))
            {
                return;
            }
            if (dataGridView1.Rows.Count <= 0)
            {
                return;
            }
            if (dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["是否需附温度计"].Value.ToString() == "附温度计")
            {
                FrmPack.Ifwdj = true;
            }
            else
            {
                FrmPack.Ifwdj = false;
            }
            FrmPack.pWdjgs = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["温度计所属公司"].Value.ToString();
            FrmPack.pName  = dataGridView1.Rows[dataGridView1.CurrentCell.RowIndex].Cells["包装类型"].Value.ToString();
            FrmPack.pLx    = bzlx(FrmPack.pName);
            FrmPack.pBzts  = cd[dataGridView1.CurrentCell.RowIndex].pBzts;
            FrmPack.pBzjs  = cd[dataGridView1.CurrentCell.RowIndex].pBzjs;
            FrmPack.pWdj   = cd[dataGridView1.CurrentCell.RowIndex].pWdj;

            if (cd[dataGridView1.CurrentCell.RowIndex].bd != null)
            {
                FrmPack.pBd = new FrmPack.Bp_dtl[cd[dataGridView1.CurrentCell.RowIndex].bd.Length];//恶心调用 木有办法
                for (int ii = 0; ii < cd[dataGridView1.CurrentCell.RowIndex].bd.Length; ii++)
                {
                    FrmPack.pBd[ii].pIce_Id   = cd[dataGridView1.CurrentCell.RowIndex].bd[ii].pIce_Id;
                    FrmPack.pBd[ii].pIce_Name = cd[dataGridView1.CurrentCell.RowIndex].bd[ii].pIce_Name;
                    FrmPack.pBd[ii].pIce_Qty  = cd[dataGridView1.CurrentCell.RowIndex].bd[ii].pIce_Qty;
                }
            }
            else if (cd[dataGridView1.CurrentCell.RowIndex].bd == null)
            {
                FrmPack.pBd = null;
            }                                                                                   //防止查询跟踪单赋值的时候 listview没有清除

            FrmPack.ShowUniqueForm(true);
            if (FrmPack.Ifsave)
            {
                cd[dataGridView1.CurrentCell.RowIndex].pBzts = FrmPack.pBzts;
                cd[dataGridView1.CurrentCell.RowIndex].pBzjs = FrmPack.pBzjs;
                cd[dataGridView1.CurrentCell.RowIndex].pWdj  = FrmPack.pWdj;
                if (FrmPack.pBd != null)
                {
                    cd[dataGridView1.CurrentCell.RowIndex].bd = new Bp_dtl[FrmPack.pBd.Length];
                    for (int i = 0; i < FrmPack.pBd.Length; i++)
                    {
                        cd[dataGridView1.CurrentCell.RowIndex].bd[i].pIce_Id   = FrmPack.pBd[i].pIce_Id;
                        cd[dataGridView1.CurrentCell.RowIndex].bd[i].pIce_Name = FrmPack.pBd[i].pIce_Name;
                        cd[dataGridView1.CurrentCell.RowIndex].bd[i].pIce_Qty  = FrmPack.pBd[i].pIce_Qty;
                    }
                }
            }
        }
예제 #2
0
파일: FrmPack.cs 프로젝트: spetpet/LLGL2012
        private static FrmPack pUniqueForm = null; //窗体唯一打开代码

        #endregion Fields

        #region Constructors

        public FrmPack()
        {
            pUniqueForm = this;//窗体唯一打开代码
            InitializeComponent();
        }
예제 #3
0
파일: FrmPack.cs 프로젝트: spetpet/LLGL2012
 private void FrmPack_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
예제 #4
0
 private void FrmPack_FormClosed(object sender, FormClosedEventArgs e)
 {
     pUniqueForm = null;//窗体唯一打开代码
 }
예제 #5
0
 public FrmPack()
 {
     pUniqueForm = this;//窗体唯一打开代码
     InitializeComponent();
 }