public async Task <IActionResult> GetBuyerView(long buyerId) { BuyerModule invMod = new BuyerModule(); BuyerView view = await invMod.Buyer.Query().GetViewById(buyerId); return(Ok(view)); }
public async Task <IActionResult> DeleteBuyer([FromBody] BuyerView view) { BuyerModule invMod = new BuyerModule(); Buyer buyer = await invMod.Buyer.Query().MapToEntity(view); invMod.Buyer.DeleteBuyer(buyer).Apply(); return(Ok(view)); }
public async Task TestGetBuyerByBuyerId() { int buyerId = 1; AddressBookModule abMod = new AddressBookModule(); BuyerView buyerView = await abMod.Buyer.Query().GetViewById(buyerId); Assert.Equal("Regional Purchasing Clerk", buyerView.Title); }
public override IActionResult OnGetCreate( string sortOrder, string searchString, int?pageIndex, string fixedFilter, string fixedValue, int?switchOfCreate) { Item = new BuyerView { Id = User.Identity.Name }; return(base.OnGetCreate(sortOrder, searchString, pageIndex, fixedFilter, fixedValue, switchOfCreate)); }
private void PopulateProsAndBuyer() { if (b_FormLoad == true) { return; } int iLCCId = Convert.ToInt32(CommFun.IsNullCheck(cboPCostCentre.EditValue, CommFun.datatypes.vartypenumeric)); int iBCCId = Convert.ToInt32(CommFun.IsNullCheck(cboBCostCentre.EditValue, CommFun.datatypes.vartypenumeric)); DataSet ds = ClientBL.GetProsAndBuyer(iLCCId, iBCCId, m_sCCTransId); if (ds == null) { return; } grdPros.DataSource = ds.Tables[0]; ProsView.PopulateColumns(); ProsView.Columns["LeadId"].Visible = false; ProsView.Columns["LeadType"].Visible = false; ProsView.Columns["LeadId"].OptionsColumn.ShowInCustomizationForm = false; ProsView.Columns["LeadType"].OptionsColumn.ShowInCustomizationForm = false; ProsView.Appearance.HeaderPanel.Font = new Font(ProsView.Appearance.HeaderPanel.Font, FontStyle.Bold); ProsView.OptionsSelection.InvertSelection = true; ProsView.OptionsSelection.EnableAppearanceHideSelection = false; ProsView.Appearance.FocusedRow.ForeColor = Color.White; ProsView.Appearance.FocusedRow.BackColor = Color.Teal; ProsView.FocusedRowHandle = 0; ProsView.Focus(); grdBuyer.DataSource = ds.Tables[1]; BuyerView.PopulateColumns(); BuyerView.Columns["LeadId"].Visible = false; BuyerView.Columns["FlatId"].Visible = false; BuyerView.Columns["LeadType"].Visible = false; BuyerView.Columns["CostCentreId"].Visible = false; BuyerView.Columns["LeadId"].OptionsColumn.ShowInCustomizationForm = false; BuyerView.Columns["FlatId"].OptionsColumn.ShowInCustomizationForm = false; BuyerView.Columns["LeadType"].OptionsColumn.ShowInCustomizationForm = false; BuyerView.Columns["Name"].Group(); BuyerView.ExpandAllGroups(); BuyerView.Appearance.HeaderPanel.Font = new Font(BuyerView.Appearance.HeaderPanel.Font, FontStyle.Bold); BuyerView.OptionsSelection.InvertSelection = true; BuyerView.OptionsSelection.EnableAppearanceHideSelection = false; BuyerView.Appearance.FocusedRow.BackColor = Color.Teal; BuyerView.Appearance.FocusedRow.ForeColor = Color.White; BuyerView.FocusedRowHandle = 0; }
public async Task <IActionResult> UpdateBuyer([FromBody] BuyerView view) { BuyerModule invMod = new BuyerModule(); Buyer buyer = await invMod.Buyer.Query().MapToEntity(view); invMod.Buyer.UpdateBuyer(buyer).Apply(); BuyerView retView = await invMod.Buyer.Query().GetViewById(buyer.BuyerId); return(Ok(retView)); }
public async Task <IActionResult> AddBuyer([FromBody] BuyerView view) { BuyerModule invMod = new BuyerModule(); NextNumber nnBuyer = await invMod.Buyer.Query().GetNextNumber(); view.BuyerNumber = nnBuyer.NextNumberValue; Buyer buyer = await invMod.Buyer.Query().MapToEntity(view); invMod.Buyer.AddBuyer(buyer).Apply(); BuyerView newView = await invMod.Buyer.Query().GetViewByNumber(view.BuyerNumber); return(Ok(newView)); }
private void BuyView() { panelClient.Controls.Clear(); EnquiryId = Convert.ToInt32(CommFun.IsNullCheck(BuyerView.GetFocusedRowCellValue("LeadId"), CommFun.datatypes.vartypenumeric)); int i_FlatId = Convert.ToInt32(CommFun.IsNullCheck(BuyerView.GetFocusedRowCellValue("FlatId"), CommFun.datatypes.vartypenumeric)); m_sLeadName = CommFun.IsNullCheck(BuyerView.GetFocusedRowCellValue("Name"), CommFun.datatypes.vartypestring).ToString(); if (EnquiryId == 0 && m_sLeadName == "") { return; } frmBuyerDetails frm = new frmBuyerDetails() { FormBorderStyle = System.Windows.Forms.FormBorderStyle.None, Dock = DockStyle.Fill, TopLevel = false }; panelClient.Controls.Add(frm); frm.Execute(EnquiryId, m_sLeadName, i_FlatId); }
protected internal override Buyer toObject(BuyerView v) => new BuyerViewFactory().Create(v);