private void gvPackingType_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex >= 0) { PackingType_DL objPackingTypeDL = new PackingType_DL(ConnectionStringClass.GetConnection()); Form_DL objFormDL = new Form_DL(ConnectionStringClass.GetConnection()); Unit_DL objUnitDL = new Unit_DL(ConnectionStringClass.GetConnection()); try { txtPackingID.Text = Convert.ToString(gvPackingType.CurrentRow.Cells["ColPackingID"].Value); objSelectedPackingType.Type = Convert.ToString(gvPackingType.Rows[e.RowIndex].Cells["ColType"].Value); objSelectedPackingType.PackingID = Convert.ToInt64(gvPackingType.Rows[e.RowIndex].Cells["ColPackingID"].Value); objSelectedPackingType.PackingQty = Convert.ToDecimal(gvPackingType.Rows[e.RowIndex].Cells["ColPackingQty"].Value); objSelectedPackingType.PackingTitle = gvPackingType.Rows[e.RowIndex].Cells["ColPackingTitle"].Value.ToString(); objSelectedPackingType.PackingUnit = objUnitDL.Get(Convert.ToInt64(gvPackingType.Rows[e.RowIndex].Cells["colPackingUnitID"].Value)); txtPackingTypeName.Text = objSelectedPackingType.PackingTitle; txtPackingTypeSize.Text = objSelectedPackingType.PackingQty.ToString(); cmbUnit.SelectedValue = objSelectedPackingType.PackingUnit.UnitID.ToString(); this.PackingTypeSelect = true; } catch (Exception ex) { MessageBox.Show(this, ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
public void Initialize(SqlConnection Conn) { objUnitDL = new Unit_DL(Conn); objMaterialTypeDL = new MaterialType_DL(Conn); objFormDL = new Form_DL(Conn); objMaterialDL = new Material_DL(Conn); objMatCatDL = new MaterialCategory_DL(Conn); }
public void Initialize(SqlConnection Conn) { objUnitDL = new Unit_DL(Conn); objFormDL = new Form_DL(Conn); objProductCategoryDL = new ProductCategory_DL(Conn); objProductSubCategory = new ProductSubCategory_DL(Conn); objFormulaDL = new Formula_DL(Conn); objPackingTypeDL = new PackingType_DL(Conn); objFinishProductDL = new FinishProduct_DL(Conn); objbasicProductDL = new BasicProduct_DL(Conn); }
public void Initialize(SqlConnection Conn) { objUnitDL = new Unit_DL(Conn); objMachineTypeDL = new MachineType_DL(Conn); objMachineDL = new Machine_DL(Conn); }