public void UpdateTotalSummary() { if (BillId != null && !BillId.Equals(Guid.Empty)) { Bill bill = session.GetObjectByKey <Bill>(BillId); //use default TaxCalculationType //if (!bill.TaxCalculationType.Equals(Utility.Constant.CALCULATION_TYPE_ON_BILL_BY_PERCENTAGE)) //{ // bill.TaxCalculationType = Utility.Constant.CALCULATION_TYPE_ON_BILL_BY_PERCENTAGE; // bill.Save(); //} //Update subtotal UpdateSubtotal(bill); //Update bill promotion UpdateBillPromotion(); //Update bill tax UpdateBillTax(bill); //Update total UpdateTotal(bill); //Update paid UpdatePaid(bill); //Update owned UpdateOwned(bill); } }
public override int GetHashCode() { unchecked { var hashCode = BillId.GetHashCode(); hashCode = (hashCode * 397) ^ Price.GetHashCode(); hashCode = (hashCode * 397) ^ DeliveryId.GetHashCode(); hashCode = (hashCode * 397) ^ Weight; hashCode = (hashCode * 397) ^ (AddreeseeEmail != null ? AddreeseeEmail.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LocalitySandName != null ? LocalitySandName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LocalityGetName != null ? LocalityGetName.GetHashCode() : 0); return(hashCode); } }
public bool PurchaseInvoiceCreating_CRUD() { //Create new temporary bill NAS.BO.Invoice.PurchaseInvoiceBO purchaseInvoiceBO = new NAS.BO.Invoice.PurchaseInvoiceBO(); Bill bill = purchaseInvoiceBO.InitTemporary(session, BillType); BillId = bill.BillId; hfBillId["BillId"] = BillId.ToString(); formlayoutInvoiceEditingForm_LoadData(); //Get default code ArtifactCodeRuleBO artifactCodeRuleBO = new ArtifactCodeRuleBO(); txtCode.Text = artifactCodeRuleBO.GetArtifactCodeOfArtifactType(ArtifactTypeEnum.INVOICE_PURCHASE); SetControlsProperties(); return(true); }
protected void panelInvoiceEditingForm_Callback(object sender, DevExpress.Web.ASPxClasses.CallbackEventArgsBase e) { string[] args = e.Parameter.Split('|'); string command = args[0]; PurchaseInvoiceBO purchaseInvoiceBO = new PurchaseInvoiceBO(); Bill bill = null; switch (command) { case "Create": GUIContext.State = new PurchaseInvoiceCreating(this); billDetails.InitState(); break; case "Edit": if (args.Length < 2) { throw new Exception("Invalid parameters"); } BillId = Guid.Parse(args[1]); //Determine bill status hfBillId["BillId"] = BillId.ToString(); bill = purchaseInvoiceBO.GetBillById(session, BillId); if (bill.RowStatus.Equals(Utility.Constant.ROWSTATUS_BOOKED_ENTRY)) { GUIContext.State = new PurchaseInvoiceLocked(this); } else { GUIContext.State = new PurchaseInvoiceEditing(this); } billDetails.InitState(); break; case "Save": GUIContext.Request(command, this); bill = purchaseInvoiceBO.GetBillById(session, BillId); if (bill.RowStatus.Equals(Utility.Constant.ROWSTATUS_BOOKED_ENTRY)) { GUIContext.State = new PurchaseInvoiceLocked(this); } break; case "Cancel": GUIContext.Request(command, this); panelInvoiceEditingForm.JSProperties["cpEvent"] = "Closing"; break; case "Refresh": bill = purchaseInvoiceBO.GetBillById(session, BillId); if (bill.RowStatus.Equals(Utility.Constant.ROWSTATUS_BOOKED_ENTRY)) { GUIContext.State = new PurchaseInvoiceLocked(this); } else { GUIContext.State = new PurchaseInvoiceEditing(this); } break; default: break; } uEdittingInputInventoryCommand1.SettingInit <NAS.DAL.Invoice.PurchaseInvoice>(BillId, ButtonCreateInventoryCommand); }
public override string ToString() { return(BillId.ToString()); }