Exemple #1
0
        void dgrdv_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

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

            if ((objPrdID == null) || (objPrdID == DBNull.Value))
            {
                return;
            }
            string errormsg = string.Empty;

            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\" + objPrdID.ToString());
                frmImgBrowse.ShowDialog();
                this.dgrdv[icol, irow].Value = frmImgBrowse.Count;
                this.accPrd.UpdateProductForImgCount(ref errormsg,
                                                     objPrdID,
                                                     frmImgBrowse.Count);
            }
        }
Exemple #2
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.frmDetail == null)
                {
                    this.frmDetail = new FrmProductDetail();
                    new FrmStyle(frmDetail).SetPopFrmStyle(this);
                }
                this.frmDetail.PrdDetail(PrdID);
                this.frmDetail.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnPrdSetCount.Name)
            {
                if (this.frmPrdSet == null)
                {
                    this.frmPrdSet = new FrmPrdSet();
                    new FrmStyle(frmPrdSet).SetPopFrmStyle(this);
                }
                this.frmPrdSet.PrdSetBom(PrdID);
                this.frmPrdSet.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnFileCount.Name)
            {
                if (frmFileBrowse == null)
                {
                    frmFileBrowse          = new JCommon.FrmFileBrowse();
                    frmFileBrowse.ReadOnly = true;
                    new FrmStyle(frmFileBrowse).SetPopFrmStyle(this);
                }
                frmFileBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdFile\" + PrdID.ToString());
                frmFileBrowse.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnImgCount.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = true;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdImg\" + PrdID.ToString());
                frmImgBrowse.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnURL.Name)
            {
                System.Diagnostics.Process.Start(this.dgrdv[icol, irow].Value.ToString());
            }
        }
Exemple #3
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.dtblStore.DefaultView[irow]["PrdID"];

            if (this.dgrdv.Columns[icol].Name == this.ColumnlnkPriceFile.Name)
            {
                if (frmFileBrowse == null)
                {
                    frmFileBrowse          = new JCommon.FrmFileBrowse();
                    frmFileBrowse.ReadOnly = true;
                    new FrmStyle(frmFileBrowse).SetPopFrmStyle(this);
                }
                frmFileBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdSaleFile\" + PrdID.ToString());
                frmFileBrowse.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnlnkImg.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = true;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdImg\" + PrdID.ToString());
                frmImgBrowse.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnInventoryQty.Name)
            {
                if (frmPrdInventory == null)
                {
                    frmPrdInventory = new JERPApp.Store.Product.Report.FrmPrdInventory();
                    new FrmStyle(frmPrdInventory).SetPopFrmStyle(this);
                }
                frmPrdInventory.PrdInventory(PrdID);
                frmPrdInventory.ShowDialog();
            }
        }
Exemple #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.dtblStores.DefaultView[irow]["PrdID"];

            if ((this.dgrdv.Columns[icol].Name == this.ColumnMark.Name))
            {
                if (this.frmDetail == null)
                {
                    this.frmDetail = new FrmBOMStore();
                    new FrmStyle(frmDetail).SetPopFrmStyle(this);
                }
                this.frmDetail.BOMStore(PrdID);
                this.frmDetail.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnFileCount.Name)
            {
                if (frmFileBrowse == null)
                {
                    frmFileBrowse          = new JCommon.FrmFileBrowse();
                    frmFileBrowse.ReadOnly = true;
                    new FrmStyle(frmFileBrowse).SetPopFrmStyle(this);
                }
                frmFileBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdFile\" + PrdID.ToString());
                frmFileBrowse.ShowDialog();
            }
            if (this.dgrdv.Columns[icol].Name == this.ColumnImgCount.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = true;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Product\PrdImg\" + PrdID.ToString());
                frmImgBrowse.ShowDialog();
            }
        }
Exemple #5
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);
            }
        }
Exemple #6
0
        void dgrdvOnjob_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            int irow = e.RowIndex;
            int icol = e.ColumnIndex;

            if ((irow == -1) || (icol == -1))
            {
                return;
            }
            DataRow drow     = this.dtblPsnOnjob.DefaultView[irow].Row;
            object  objPsnID = drow["PsnID"];

            if ((objPsnID == null) || (objPsnID == DBNull.Value))
            {
                return;
            }
            string errormsg = string.Empty;

            if (this.dgrdvOnjob.Columns[icol].Name == this.ColumnbtnOffjob.Name)
            {
                if (this.dgrdvOnjob.Rows [irow].IsNewRow)
                {
                    return;
                }
                DateTime DateDismiss = DateTime.Now.Date;
                JCommon.FrmSetDateTime.ShowDialog(ref DateDismiss);
                this.accPsns.UpdatePersonnelForOffjob(ref errormsg,
                                                      objPsnID, DateDismiss);
                this.dgrdvOnjob.Rows.RemoveAt(irow);
                this.LoadOffjob();
            }
            if (this.dgrdvOnjob.Columns[icol].Name == this.ColumnSignImgCount.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = !this.enableSave;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Hr\SignImg\" + objPsnID.ToString());
                frmImgBrowse.ShowDialog();
                this.dgrdvOnjob[icol, irow].Value = frmImgBrowse.Count;
                this.accPsns.UpdatePersonnelForSignImgCount(ref errormsg,
                                                            objPsnID,
                                                            frmImgBrowse.Count);
            }
            if (this.dgrdvOnjob.Columns[icol].Name == this.ColumnPortraitImgCount.Name)
            {
                if (frmImgBrowse == null)
                {
                    frmImgBrowse          = new JCommon.FrmImgBrowse();
                    frmImgBrowse.ReadOnly = !this.enableSave;
                    new FrmStyle(frmImgBrowse).SetPopFrmStyle(this);
                }
                frmImgBrowse.Browse(JERPData.ServerParameter.ERPFileFolder + @"\Hr\PortraitImg\" + objPsnID.ToString());
                frmImgBrowse.ShowDialog();
                this.dgrdvOnjob[icol, irow].Value = frmImgBrowse.Count;
                this.accPsns.UpdatePersonnelForPortraitImgCount(ref errormsg,
                                                                objPsnID,
                                                                frmImgBrowse.Count);
            }
        }