void BindSalesReturned() { oblSalesReturned = new Store.SalesReturned.BusinessLogic.SalesReturned(); try { objSalesReturnedList = oblSalesReturned.GetAllSalesReturnedList(0, 0, ""); if (objSalesReturnedList != null) { dgvSalesReturned.DataSource = objSalesReturnedList; dgvSalesReturned.DataBind(); } else { dgvSalesReturned.DataSource = null; dgvSalesReturned.DataBind(); } } catch (Exception ex) { } finally { oblSalesReturned = null; objSalesReturnedList = null; } }
void BindSaleOrder() { oblSalesRtn = new Store.SalesReturned.BusinessLogic.SalesReturned(); // oblPurchaseOrder = new Store.PurchaseOrder.BusinessLogic.PurchaseOrder(); try { objsalesRtnList = oblSalesRtn.GetAllSalesReturnedList(0, 0, ""); //objPurchaseOrderlist = oblPurchaseOrder.GetAllPurchaseOrderList(0, 0, ""); if (objsalesRtnList != null) { gvSaleRtn.DataSource = objsalesRtnList; gvSaleRtn.DataBind(); } else { gvSaleRtn.DataSource = null; gvSaleRtn.DataBind(); } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(SalesReturn).FullName, 1); } finally { oblSalesRtn = null; objsalesRtnList = null; } }
void BindSalesReturned() { oblSalesReturn = new Store.SalesReturned.BusinessLogic.SalesReturned(); try { objSalesReturnList = oblSalesReturn.GetAllSalesReturnedList(0, 0, ""); if (objSalesReturnList != null) { ddlSalesReturnID.DataSource = objSalesReturnList; ddlSalesReturnID.DataValueField = "SalesReturnedID"; //ddlSalesReturnID.DataTextField = "SaleReturnedID"; ddlSalesReturnID.DataBind(); } else { ddlSalesReturnID.DataSource = null; ddlSalesReturnID.DataBind(); } } catch (Exception) { throw; } finally { oblSalesReturn = null; objSalesReturnList = null; } }
public string insertSalesReturn(string subtotal, string tax, string shc, string misccost, string ttotal) { oblSalesRtn = new Store.SalesReturned.BusinessLogic.SalesReturned(); // oblPurchaseReceived = new Store.PurchaseReceived.BusinessLogic.PurchaseReceived(); objMessageInfo = new MessageInfo(); objSalesRtn = new Store.SalesReturned.BusinessObject.SalesReturned(); if (cmdMode == Store.Common.CommandMode.M) { objSalesRtn.SalesReturnedID = Convert.ToInt32(hfPId.Value); // objPurchaseReceived.PurchaseReceivedID = Convert.ToInt32(hfPId.Value);//PurchaseReceivedID which edit from data grid } else { // objPurchaseReceived.PurchaseReceivedID = 0; } objSalesRtn.SalesReturnedID = Convert.ToInt32(hfSaleOrder.Value); objSalesRtn.VendorID = Convert.ToInt32(hfVendor.Value); objSalesRtn.TotalSalesReturnAmount = Convert.ToDecimal(ttotal); objSalesRtn.TaxValue = Convert.ToDecimal(tax); objSalesRtn.ShippingAndHandlingCost = Convert.ToDecimal(shc); objSalesRtn.MiscCost = Convert.ToDecimal(misccost); objSalesRtn.IsActive = 1; objMessageInfo = oblSalesRtn.ManageSalesRetuned(objSalesRtn, cmdMode); return(objMessageInfo.TranID.ToString()); }
void BindSaleOrder(int id) { oblSalesRtn = new Store.SalesReturned.BusinessLogic.SalesReturned(); // oblPurchaseOrder = new Store.PurchaseOrder.BusinessLogic.PurchaseOrder(); try { objSalesRtn = oblSalesRtn.GetAllSalesReturned(id, 0, ""); objSalesRtn = oblSalesRtn.GetAllSalesReturned(id, 0, ""); if (objSalesRtn != null) { txtSHC.Text = objSalesRtn.ShippingAndHandlingCost.ToString(); txtTax.Text = objSalesRtn.TaxValue.ToString(); txtMiscCost.Text = objSalesRtn.MiscCost.ToString(); txttotal.Text = objSalesRtn.TotalSalesReturnAmount.ToString(); } else { txtSHC.Text = ""; txtTax.Text = ""; txttotal.Text = ""; } } catch (Exception ex) { Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(SalesReturn).FullName, 1); } finally { oblSalesRtn = null; objSalesRtn = null; } upSummary.Update(); }
private void BindSalesReturn() { try { oblSalesRtn = new Store.SalesReturned.BusinessLogic.SalesReturned(); objsalesRtnList = new Store.SalesReturned.BusinessObject.SalesReturnedList(); objsalesRtnList = oblSalesRtn.GetAllSalesReturnedList(0, 0, ""); if (objsalesRtnList != null) { gvSalesRtn.DataSource = objsalesRtnList; gvSalesRtn.DataBind(); } else { gvSalesRtn.DataSource = null; gvSalesRtn.DataBind(); } } catch (Exception ex) { throw ex; } finally { oblSalesRtn = null; objsalesRtnList = null; } }
void ManageSalesReturned() { objSalesReturned = new Store.SalesReturned.BusinessObject.SalesReturned(); oblSalesReturned = new Store.SalesReturned.BusinessLogic.SalesReturned(); try { if (cmdMode == Store.Common.CommandMode.M) { objSalesReturned.SalesReturnedID = Convert.ToInt32(txtSalesReturnedID.Text); } else { objSalesReturned.SalesReturnedID = 0; } objSalesReturned.VendorID = Convert.ToInt32(ddlVendor.SelectedItem.Value); objSalesReturned.SalesReturnDate = Convert.ToDateTime(txtSalesReturnDate.Text); objSalesReturned.TotalSalesReturnAmount = Convert.ToDecimal(txtTotalSalesReturnAmount.Text); objSalesReturned.TaxValue = Convert.ToDecimal(txtTaxValue.Text); objSalesReturned.ShippingAndHandlingCost = Convert.ToDecimal(txtShippingHandlingCost.Text); objSalesReturned.MiscCost = Convert.ToDecimal(txtMiscCost.Text); objSalesReturned.SalesOrderID = Convert.ToInt32(ddlSalesOrderID.SelectedItem.Value); if (cbIsActive.Checked) { objSalesReturned.IsActive = 1; } else { objSalesReturned.IsActive = 0; } objSalesReturned.CreatedBy = 1; objMessageInfo = oblSalesReturned.ManageItemMaster(objSalesReturned, cmdMode); } catch (Exception ex) { } finally { objSalesReturned = null; //objMessageInfo = null; oblSalesReturned = null; } }
public string insertOrder(string tax, string shc, string misccost, string ttotal) { Store.SalesReturned.BusinessObject.SalesReturned objSalesReturned = new Store.SalesReturned.BusinessObject.SalesReturned(); Store.SalesReturned.BusinessLogic.SalesReturned oblSalesReturned = new Store.SalesReturned.BusinessLogic.SalesReturned(); //Store.PurchaseReceived.BusinessLogic.PurchaseReceived oblPurchaseReceived = new Store.PurchaseReceived.BusinessLogic.PurchaseReceived(); Store.Common.MessageInfo objMessageInfo = new MessageInfo(); //Store.PurchaseReceived.BusinessObject.PurchaseReceived objPurchaseReceived = new Store.PurchaseReceived.BusinessObject.PurchaseReceived(); objSalesReturned.SalesReturnedID = 0; objSalesReturned.SalesOrderID = Convert.ToInt32(txtPoId.Text); objSalesReturned.TotalSalesReturnAmount = Convert.ToDecimal(ttotal); objSalesReturned.VendorID = 0; objSalesReturned.TaxValue = Convert.ToDecimal(tax); objSalesReturned.ShippingAndHandlingCost = Convert.ToDecimal(shc); objSalesReturned.MiscCost = Convert.ToDecimal(misccost); // objMessageInfo = oblSalesReturned.ManageSalesRetuned(objSalesReturned,cmdMode); //objMessageInfo = oblPurchaseReceived.ManagePurchaseReceived(objPurchaseReceived, 1); return(objMessageInfo.TranID.ToString()); }
public string insertItem(string name, string description, string unitprice, string quantity, string tranID) { Store.SalesReturned.BusinessLogic.SalesReturned oblSaleReturnItem = new Store.SalesReturned.BusinessLogic.SalesReturned(); Store.SaleReturnItem.BusinessObject.SaleReturnItem objSaleReturnItem = new Store.SaleReturnItem.BusinessObject.SaleReturnItem(); //Store.PurchaseReceivedItem.BusinessObject.PurchaseReceivedItem objPurchaseReceivedItem = new Store.PurchaseReceivedItem.BusinessObject.PurchaseReceivedItem(); Store.Common.MessageInfo objMessageInfo = new MessageInfo(); //Store.PurchaseReceived.BusinessLogic.PurchaseReceived oblPurchaseReceived = new Store.PurchaseReceived.BusinessLogic.PurchaseReceived(); objSaleReturnItem.SaleReturnItemID = 0; objSaleReturnItem.SalesOrderID = Convert.ToInt32(txtPoId.Text); objSaleReturnItem.SalesReturnID = Convert.ToInt32(tranID); objSaleReturnItem.ItemPrefix = name; objSaleReturnItem.ItemUnit = quantity; objSaleReturnItem.Description = description; objSaleReturnItem.ItemPrice = Convert.ToDecimal(unitprice); objMessageInfo = oblSaleReturnItem.ManageSalesRetunedItem(objSaleReturnItem, 1); //objPurchaseOrder = new Store.PurchaseOrder.BusinessObject.PurchaseOrder(); return(""); }
protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e) { cmdMode = CommandMode.D; objSalesReturned = new Store.SalesReturned.BusinessObject.SalesReturned(); oblSalesReturned = new Store.SalesReturned.BusinessLogic.SalesReturned(); try { ImageButton btndetails = sender as ImageButton; GridViewRow gvrow = (GridViewRow)btndetails.NamingContainer; objSalesReturned.SalesReturnedID = Convert.ToInt32(dgvSalesReturned.DataKeys[gvrow.RowIndex].Value.ToString()); objSalesReturned.VendorID = 0; objSalesReturned.SalesReturnDate = DateTime.Now; objSalesReturned.TotalSalesReturnAmount = 0; objSalesReturned.TaxValue = 0; objSalesReturned.ShippingAndHandlingCost = 0; objSalesReturned.MiscCost = 0; objSalesReturned.SalesOrderID = 0; objSalesReturned.ClientID = 0; objSalesReturned.CreatedBy = 1; objMessageInfo = oblSalesReturned.ManageItemMaster(objSalesReturned, cmdMode); BindSalesReturned(); updateSalesReturnedBdInfo.Update(); } catch (Exception ex) { throw; } finally { objSalesReturned = null; objMessageInfo = null; oblSalesReturned = null; } }