protected void GrdReport_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { SystemOpening += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SystemOpening")); ActualOpening += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualOpening")); Purchase += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Purchase")); Sales += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Sales")); SalesReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SalesReturn")); Inward += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Inward")); Outward += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Outward")); OutwardReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "OutwardReturn")); TransferIN += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TransferIN")); TransferOUT += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TransferOUT")); Damaged += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Damage")); PurReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ReturnToSupplier")); Deviation += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Deviation")); SystemClosing += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SystemClosing")); ActualClosing += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualClosing")); SystemAmount += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SystemAmount")); ActualAmount += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ActualAmount")); UNITActualAmount += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "STOCKINHANDWITHUNITCONVERTSYSTEM")); UNITOutwardReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "STOCKINHANDWITHUNITCONVERTACTUAL")); } if (e.Row.RowType == DataControlRowType.Footer) { e.Row.Cells[6].Text = "Total"; e.Row.Cells[7].Text = SystemOpening.ToString("0.00"); e.Row.Cells[8].Text = ActualOpening.ToString("0.00"); e.Row.Cells[9].Text = Purchase.ToString("0.00"); e.Row.Cells[11].Text = Sales.ToString("0.00"); e.Row.Cells[12].Text = SalesReturn.ToString("0.00"); e.Row.Cells[13].Text = Inward.ToString("0.00"); e.Row.Cells[14].Text = Outward.ToString("0.00"); e.Row.Cells[15].Text = OutwardReturn.ToString("0.00"); e.Row.Cells[16].Text = TransferIN.ToString("0.00"); e.Row.Cells[17].Text = TransferOUT.ToString("0.00"); e.Row.Cells[18].Text = Damaged.ToString("0.00"); e.Row.Cells[10].Text = PurReturn.ToString("0.00"); e.Row.Cells[19].Text = Deviation.ToString("0.00"); e.Row.Cells[20].Text = SystemClosing.ToString("0.00"); e.Row.Cells[21].Text = ActualClosing.ToString("0.00"); e.Row.Cells[23].Text = UNITActualAmount.ToString("0.00"); e.Row.Cells[24].Text = UNITOutwardReturn.ToString("0.00"); e.Row.Cells[25].Text = SystemAmount.ToString("0.00"); e.Row.Cells[26].Text = ActualAmount.ToString("0.00"); } } catch (Exception ex) { } }
private void FindNextActionAndExecute() { if (currentPlan.Count == 0) { Action next = GetNextAction(worldState); if (next.isMethod) { //we dont have a state after taking out //we dont have a state after trading //we have a state before executing method //we have a state after executing method //need a state at all points because of the thief //IDDEA: stash take out dont retake out StashAll stash = new StashAll(worldState); stash.IsValid(); TransferOUT transfer = new TransferOUT(stash.postConditions, next); //condition gets copied next.postConditions = transfer.postConditions.DeepCopy(); next.IsValid(); currentPlan.Enqueue(stash); currentPlan.Enqueue(transfer); currentPlan.Enqueue(next); } else { currentPlan.Enqueue(next); } } nextAction = currentPlan.Dequeue(); nextAction.Execute(this); DisplayActionUI(); /////////////////////////////////////// //counter++; //Debug.Log(counter); //Debug.Log("Executing : " + nextAction.toString()); /////////////////////////////////////// executingAction = true; }
protected void GrdReport_RowDataBound(object sender, GridViewRowEventArgs e) { try { if (e.Row.RowType == DataControlRowType.DataRow) { Opening += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Opening")); Purchase += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Purchase")); Sales += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Sales")); SalesReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "SalesReturn")); Inward += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Inward")); Outward += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Outward")); OutwardReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "OutwardReturn")); TransferIN += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TransferIN")); TransferOUT += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TransferOUT")); Damaged += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Damage")); PurReturn += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "ReturnToSupplier")); Closing += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Closing")); Amount += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Amount")); Consumption += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Consumption")); } if (e.Row.RowType == DataControlRowType.Footer) { e.Row.Cells[6].Text = "Total"; e.Row.Cells[7].Text = Opening.ToString("0.00"); e.Row.Cells[8].Text = Purchase.ToString("0.00"); e.Row.Cells[9].Text = Sales.ToString("0.00"); e.Row.Cells[10].Text = SalesReturn.ToString("0.00"); e.Row.Cells[12].Text = Inward.ToString("0.00"); e.Row.Cells[13].Text = Outward.ToString("0.00"); e.Row.Cells[14].Text = OutwardReturn.ToString("0.00"); e.Row.Cells[16].Text = TransferIN.ToString("0.00"); e.Row.Cells[17].Text = TransferOUT.ToString("0.00"); e.Row.Cells[15].Text = Damaged.ToString("0.00"); e.Row.Cells[11].Text = PurReturn.ToString("0.00"); e.Row.Cells[19].Text = Closing.ToString("0.00"); e.Row.Cells[20].Text = Amount.ToString("0.00"); e.Row.Cells[18].Text = Consumption.ToString("0.00"); } } catch (Exception ex) { } }