Example #1
0
 void lnkNew_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     if (this.frmOper == null)
     {
         this.frmOper = new FrmProductOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         this.frmOper.AffterSave += this.LoadData;
     }
     this.frmOper.New();
     this.frmOper.ShowDialog();
 }
Example #2
0
 private void ShowFrmOper(int PrdID)
 {
     if (frmOper == null)
     {
         frmOper = new FrmProductOper();
         new FrmStyle(frmOper).SetPopFrmStyle(this);
         frmOper.AffterSave += this.LoadData;
     }
     frmOper.Edit(PrdID);
     frmOper.ShowDialog();
 }
Example #3
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

            if ((irow == -1) || (icol == -1))
            {
                return;
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnMark.Name)
            {
                object objPrdID = this.dgrdv[this.ColumnPrdID.Name, irow].Value;
                if ((objPrdID != null) && (objPrdID != DBNull.Value))
                {
                    if (frmOper == null)
                    {
                        frmOper = new FrmProductOper();
                        new FrmStyle(frmOper).SetPopFrmStyle(this.ParentForm);
                    }
                    frmOper.Edit((int)objPrdID);
                    frmOper.ShowDialog();
                }
            }
        }
Example #4
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

            if ((irow == -1) || (icol == -1))
            {
                return;
            }
            int PrdID = (int)this.dtblPrds.DefaultView[irow]["PrdID"];

            if (this.dgrdv.Columns[icol].Name == this.ColumnMark.Name)
            {
                if (this.frmOper == null)
                {
                    this.frmOper = new FrmProductOper();
                    new FrmStyle(frmOper).SetPopFrmStyle(this);
                    this.frmOper.AffterSave += this.LoadData;
                }
                this.frmOper.Edit(PrdID);
                this.frmOper.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnPrdSetCount.Name)
            {
                if (frmPrdSetOper == null)
                {
                    frmPrdSetOper = new FrmPrdSetOper();
                    new FrmStyle(frmPrdSetOper).SetPopFrmStyle(this);
                    frmPrdSetOper.AffterSave += new FrmPrdSetOper.AffterSaveDelegate(frmSetBomOper_AffterSave);
                }
                frmPrdSetOper.PrdSetBomOper(PrdID);
                frmPrdSetOper.ShowDialog();
            }
            string errormsg = string.Empty;

            if (this.dgrdv.Columns[icol].Name == this.ColumnFileCount.Name)
            {
                if (frmFileBrowse == null)
                {
                    frmFileBrowse          = new JCommon.FrmFileBrowse();
                    frmFileBrowse.ReadOnly = !this.enableSave;
                    new FrmStyle(frmFileBrowse).SetPopFrmStyle(this);
                }
                frmFileBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdFile\" + PrdID.ToString());
                frmFileBrowse.ShowDialog();
                this.dgrdv[icol, irow].Value = frmFileBrowse.Count;
                this.accPrds.UpdateProductForFileCount(
                    ref errormsg,
                    PrdID,
                    frmFileBrowse.Count);
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnImgCount.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = !this.enableSave;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdImg\" + PrdID.ToString());
                frmImgBrowse.ShowDialog();
                this.dgrdv[icol, irow].Value = frmImgBrowse.Count;
                this.accPrds.UpdateProductForImgCount(ref errormsg,
                                                      PrdID,
                                                      frmImgBrowse.Count);
            }
        }