void BindPurchaseOrderItem(int id) { oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); try { objPurchaseOrderItemList = oblPurchaseOrderItem.GetAllPurchaseOrderItemList(id, 0, ""); if (objPurchaseOrderItemList != null) { Gridview1.DataSource = objPurchaseOrderItemList; Gridview1.DataBind(); } else { Gridview1.DataSource = null; Gridview1.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(PReceived).FullName, 1); } finally { oblPurchaseOrderItem = null; objPurchaseOrderItemList = null; } }
protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e) { cmdMode = CommandMode.D; objPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessObject.PurchaseOrderItem(); oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); try { ImageButton btndetails = sender as ImageButton; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; objPurchaseOrderItem.PurchaseOrderItemID = Convert.ToInt32(dgvPurchaseItemOrder.DataKeys[gvrow.RowIndex].Value.ToString()); objPurchaseOrderItem.PurchaseOrderID = 0; objPurchaseOrderItem.PurchaseOrderID = 0; objPurchaseOrderItem.ItemID = 0; objPurchaseOrderItem.ItemUnit = ""; objPurchaseOrderItem.Description = ""; objPurchaseOrderItem.ItemPrice = 0; objPurchaseOrderItem.ClientID = 0; objPurchaseOrderItem.CreatedBy = 1; objMessageInfo = oblPurchaseOrderItem.ManageItemMaster(objPurchaseOrderItem, cmdMode); BindPurchaseOrderItem(); updatePurchasedItemOrderBdInfo.Update(); } catch (Exception ex) { throw; } finally { objPurchaseOrderItem = null; objMessageInfo = null; oblPurchaseOrderItem = null; } }
void BindPurchaseOrderItem() { oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); try { objPurchaseOrderItemList = oblPurchaseOrderItem.GetAllPurchaseOrderItemList(0, 0, ""); if (objPurchaseOrderItemList != null) { dgvPurchaseItemOrder.DataSource = objPurchaseOrderItemList; dgvPurchaseItemOrder.DataBind(); } else { dgvPurchaseItemOrder.DataSource = null; dgvPurchaseItemOrder.DataBind(); } } catch (Exception ex) { } finally { oblPurchaseOrderItem = null; objPurchaseOrderItemList = null; } }
void ManagePurchaseItemRecived() { objPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessObject.PurchaseOrderItem(); oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); try { if (cmdMode == Store.Common.CommandMode.M) { objPurchaseOrderItem.PurchaseOrderItemID = Convert.ToInt32(txtPurchaseItemOrderID.Text); } else { objPurchaseOrderItem.PurchaseOrderItemID = 0; } objPurchaseOrderItem.PurchaseOrderID = Convert.ToInt16(ddlPurchaseOrderId.SelectedItem.Value); objPurchaseOrderItem.PurchaseOrderID = Convert.ToInt16(ddlPurchaseOrderId.SelectedItem.Value); objPurchaseOrderItem.ItemID = Convert.ToInt16(ddlItemId.SelectedItem.Value); objPurchaseOrderItem.ItemUnit = Convert.ToString(txtItemUnit.Text); objPurchaseOrderItem.Description = Convert.ToString(txtDescription.Text); objPurchaseOrderItem.ItemPrice = Convert.ToDecimal(txtItemPrice.Text); if (chkBoxIsActive.Checked) { objPurchaseOrderItem.IsActive = 1; } else { objPurchaseOrderItem.IsActive = 0; } objPurchaseOrderItem.CreatedBy = 1; objMessageInfo = oblPurchaseOrderItem.ManageItemMaster(objPurchaseOrderItem, cmdMode); } catch (Exception ex) { } finally { objPurchaseOrderItem = null; objMessageInfo = null; oblPurchaseOrderItem = null; } }
Store.PurchaseOrderItem.BusinessObject.PurchaseOrderItemList BindPurchaseOrderItem(int id) { oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); try { objPurchaseOrderItemList = oblPurchaseOrderItem.GetAllPurchaseOrderItemList(id, 0, ""); return(objPurchaseOrderItemList); } catch (Exception ex) { return(null); } finally { oblPurchaseOrderItem = null; objPurchaseOrderItemList = null; } }
protected void btnCheckOut_Click(object sender, EventArgs e) { try { string transid = ""; transid = insertOrder(txtSubTotal.Text, txtDicPre.Text, txtDic.Text, txtTax.Text, txtSHC.Text, txtMiscCost.Text, txttotal.Text); objPurchaseOrderItemList = new Store.PurchaseOrderItem.BusinessObject.PurchaseOrderItemList(); for (int i = 0; i < Gridview1.Rows.Count - 1; i++) { objPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessObject.PurchaseOrderItem(); TextBox txtItemNames = (TextBox)Gridview1.Rows[i].FindControl("txtItemName"); if (txtItemNames.Text == "") break; TextBox txtDecs = (TextBox)Gridview1.Rows[i].FindControl("txtDec"); TextBox txtPrices = (TextBox)Gridview1.Rows[i].FindControl("txtPrice"); TextBox txtDisPres = (TextBox)Gridview1.Rows[i].FindControl("txtDisPre"); TextBox txtDiss = (TextBox)Gridview1.Rows[i].FindControl("txtDis"); TextBox txtQuts = (TextBox)Gridview1.Rows[i].FindControl("txtQut"); TextBox txtTotals = (TextBox)Gridview1.Rows[i].FindControl("txtTotal"); objPurchaseOrderItem.ItemPrefix = txtItemNames.Text; objPurchaseOrderItem.Description = txtDecs.Text; objPurchaseOrderItem.ItemPrice = Convert.ToDecimal(txtPrices.Text); objPurchaseOrderItem.DiscountPre = Convert.ToDecimal(txtDisPres.Text); objPurchaseOrderItem.Discount = Convert.ToDecimal(txtDiss.Text); objPurchaseOrderItem.ItemUnit = txtQuts.Text; objPurchaseOrderItem.TotalPrice = Convert.ToDecimal(txtTotals.Text); objPurchaseOrderItem.PurchaseOrderID = Convert.ToInt32(transid); objPurchaseOrderItemList.Add(objPurchaseOrderItem); } oblPurchaseOrderItem = new Store.PurchaseOrderItem.BusinessLogic.PurchaseOrderItem(); objMessageInfo = oblPurchaseOrderItem.ManageItemMaster(objPurchaseOrderItemList, cmdMode); reset(); } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(POrder).FullName, 1); } }