private void GetList() { vendor = new Vendor(); purchaseData = new PurchaseData(); DataSet DS = new DataSet(); vendor.Flag = 0; //Select * vendor.VendorCode = string.Empty; vendor.VendorName = string.Empty; vendor.Address = string.Empty; vendor.City = string.Empty; vendor.State = string.Empty; vendor.Mobile = string.Empty; vendor.Phone = string.Empty; vendor.Email = string.Empty; DS = purchaseData.GetVendorsList(vendor); if (!Comman.Comman.IsDataSetEmpty(DS)) { rpBrandInfo.DataSource = DS; rpBrandInfo.DataBind(); } }
// GET: Purchases public ActionResult GetPurchaseHistory(string sessionId) { sessionId = (string)Session["sessionid"]; List <Purchase> purchases = PurchaseData.GetPurchaseHistoryBy(sessionId); //ViewData["cartId"] = cartId; ViewData["purchases"] = purchases; //ViewData["results"] = results; if (sessionId != null) { return(View()); } else { return(RedirectToAction("Index", "Login")); } }
public void cancelAutoItem() { string auto_json = PlayerPrefs.GetString(auto_pId1); PurchaseData response = JsonUtility.FromJson <PurchaseData> (auto_json); if (auto_json.Length > 0) { string command = ""; if (response.recurringState == 0) { command = "cancel"; } else if (response.recurringState == 1) { command = "reactivate"; } Onestore_IapCallManager.manageRecurringAuto(auto_json, command); } else { AndroidNative.showMessage("Warning!!", "no data for manageRecurringAuto", "ok"); } }
protected void btnSubmit_Click(object sender, EventArgs e) { Request request = new Request(); purchaseData = new PurchaseData(); RequestCart rc = new RequestCart(); request.CreatedBy = GlobalInfo.Userid; request.ReqStatus = "Pending"; request.RequestDate = DateTime.Now; request.Tokan = hftokanno.Value; rc.Tokan = hftokanno.Value; bool result = purchaseData.SubmitRequest(request); if (result) { rc.Purpose = string.Empty; rc.Specification = string.Empty; rc.Remark = string.Empty; bindCartList(rc); //clearFields(); divDanger.Visible = false; divwarning.Visible = false; divSusccess.Visible = true; pnlError.Update(); upMain.Update(); } else { divDanger.Visible = false; divwarning.Visible = true; divSusccess.Visible = false; lblwarning.Text = "Please Contact to Site Admin"; pnlError.Update(); } }
public async Task Should_GetSuccessJSONResponse_When_ValidJsonPurchaseInfoSupplied(string paymentInfoJson, string expectedResponseJson) { //Arrange var client = _factory.GetAnonymousClient(); var apiEndPoint = "/api/purchase"; var contentGrossAmount = Utilities.GetRequestContentFromJSONString(paymentInfoJson); PurchaseData expectedResponseObj = JsonConvert.DeserializeObject <PurchaseData>(expectedResponseJson); //Act var httpResponse = await client.PostAsync(apiEndPoint, contentGrossAmount); var responseString = await httpResponse.Content.ReadAsStringAsync(); PurchaseData responseObj = JsonConvert.DeserializeObject <PurchaseData>(responseString); // Assert - HTTP success response Assert.True(httpResponse.IsSuccessStatusCode); //Assert - compare httpresponse with expectedResponse Assert.Equal(expectedResponseObj.VATRate, responseObj.VATRate); Assert.Equal(expectedResponseObj.GrossAmount, responseObj.GrossAmount); Assert.Equal(expectedResponseObj.NetAmount, responseObj.NetAmount); Assert.Equal(expectedResponseObj.VATAmount, responseObj.VATAmount); }
private List<PurchaseData> GetWarning() { List<PurchaseData> list = new List<PurchaseData>(); IList<WarehouseStockType> stocks = new List<WarehouseStockType>(); IList<PurchasePlanType> plans = new List<PurchasePlanType>(); IList<ProductType> products = NSession.CreateQuery( @" From ProductType p where ( (round((SevenDay/7*0.5+Fifteen/15*0.3+ThirtyDay/30*0.2),0)*5)>(select count(Id) from SKUCodeType where IsOut=0 and SKU= p.SKU) Or SKU in(select SKU from OrderProductType where OId In(select Id from OrderType where IsOutOfStock=1 and Status<>'作废订单')) )and IsScan=1 and Status not in('滞销','清仓','停产','暂停销售')") .List<ProductType>(); string ids = ""; foreach (var p in products) { ids += "'" + p.SKU + "',"; } stocks = NSession.CreateQuery("from WarehouseStockType where SKU in(" + ids.Trim(',') + ")").List<WarehouseStockType>(); plans = NSession.CreateQuery("from PurchasePlanType where Status not in('异常','已收到') and SKU in(" + ids.Trim(',') + ")") .List<PurchasePlanType>(); IList<object[]> SKUCount = NSession.CreateQuery("select SKU,count(Id) from SKUCodeType where IsOut=0 and SKU In (" + ids.Trim(',') + ") group by SKU").List<object[]>(); IList<OrderProductType> orderProducts = NSession.CreateQuery("from OrderProductType where SKU in(" + ids.Trim(',') + ") and IsQue=1 and OId In(select Id from OrderType where IsOutOfStock=1 and Status<>'作废订单')") .List<OrderProductType>(); foreach (var p in products) { PurchaseData data = new PurchaseData(); data.ItemName = p.ProductName; data.SKU = p.SKU; data.SPic = p.SPicUrl; data.SevenDay = p.SevenDay; data.FifteenDay = p.Fifteen; data.ThirtyDay = p.ThirtyDay; data.WarningQty = Convert.ToInt32(Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 0) * 5); if (data.WarningQty < 1) { data.WarningQty = 1; } data.IsImportant = 0; data.AvgQty = Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 2); foreach (var objectes in SKUCount) { if (objectes[0].ToString().ToUpper() == data.SKU.ToUpper()) { data.NowQty = Convert.ToInt32(objectes[1]); break; } } if (Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 0) * 3 < data.NowQty) { data.IsImportant = 1; } int buyQty = plans.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.DaoQty); data.BuyQty = plans.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.Qty) - buyQty; data.QueQty = orderProducts.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.Qty); if ((data.NowQty + data.BuyQty - data.WarningQty - data.QueQty) < 0) { data.NeedQty = Convert.ToInt32(data.AvgQty * p.DayByStock) + data.QueQty - data.NowQty - data.BuyQty; if (data.NeedQty > 0) list.Add(data); } } return list; }
public PurchaseBusiness() { purchaseD = new PurchaseData(); }
public void Send(PurchaseData purchaseData) { byte[] messageBodyBytes = Encoding.UTF8.GetBytes(purchaseData.ToString()); Channel.BasicPublish("", "TEST", null, messageBodyBytes); Disconnect(); }
public async void Should_CalculateAndComparePurchaseData_With_PreCalculatedPurchaseData(PurchaseData purchaseData) { // Arrange var pcmd = new CalculatePurchaseCommand.Handler(new PurchaseService()); // Act var resultGrossAmount = await pcmd.Handle(new CalculatePurchaseCommand { VATRate = purchaseData.VATRate, GrossAmount = purchaseData.GrossAmount }, CancellationToken.None); var resultVATAmount = await pcmd.Handle(new CalculatePurchaseCommand { VATRate = purchaseData.VATRate, VATAmount = purchaseData.VATAmount }, CancellationToken.None); var resultNetAmount = await pcmd.Handle(new CalculatePurchaseCommand { VATRate = purchaseData.VATRate, NetAmount = purchaseData.NetAmount }, CancellationToken.None); // Assert Assert.Equal(purchaseData.VATRate, resultGrossAmount.VATRate); Assert.Equal(purchaseData.GrossAmount, resultGrossAmount.GrossAmount); Assert.Equal(purchaseData.VATAmount, resultGrossAmount.VATAmount); Assert.Equal(purchaseData.NetAmount, resultGrossAmount.NetAmount); Assert.Equal(purchaseData.VATRate, resultVATAmount.VATRate); Assert.Equal(purchaseData.GrossAmount, resultVATAmount.GrossAmount); Assert.Equal(purchaseData.VATAmount, resultVATAmount.VATAmount); Assert.Equal(purchaseData.NetAmount, resultVATAmount.NetAmount); Assert.Equal(purchaseData.VATRate, resultNetAmount.VATRate); Assert.Equal(purchaseData.GrossAmount, resultNetAmount.GrossAmount); Assert.Equal(purchaseData.VATAmount, resultNetAmount.VATAmount); Assert.Equal(purchaseData.NetAmount, resultNetAmount.NetAmount); }
public void setPurchaseData(PurchaseData purchaseData) { this.purchaseData = purchaseData; price.text = purchaseData.price; }
public PurchasableItemsIapData() { PurchaseDatas = new PurchaseData[0]; }
private List <PurchaseData> GetWarning() { List <PurchaseData> list = new List <PurchaseData>(); IList <WarehouseStockType> stocks = new List <WarehouseStockType>(); IList <PurchasePlanType> plans = new List <PurchasePlanType>(); IList <ProductType> products = NSession.CreateQuery( @" From ProductType p where ( (round((SevenDay/7*0.5+Fifteen/15*0.3+ThirtyDay/30*0.2),0)*5)>(select count(Id) from SKUCodeType where IsOut=0 and SKU= p.SKU) Or SKU in(select SKU from OrderProductType where OId In(select Id from OrderType where IsOutOfStock=1 and Status<>'作废订单')) )and IsScan=1 and Status not in('滞销','清仓','停产','暂停销售')") .List <ProductType>(); string ids = ""; foreach (var p in products) { ids += "'" + p.SKU + "',"; } stocks = NSession.CreateQuery("from WarehouseStockType where SKU in(" + ids.Trim(',') + ")").List <WarehouseStockType>(); plans = NSession.CreateQuery("from PurchasePlanType where Status not in('异常','已收到') and SKU in(" + ids.Trim(',') + ")") .List <PurchasePlanType>(); IList <object[]> SKUCount = NSession.CreateQuery("select SKU,count(Id) from SKUCodeType where IsOut=0 and SKU In (" + ids.Trim(',') + ") group by SKU").List <object[]>(); IList <OrderProductType> orderProducts = NSession.CreateQuery("from OrderProductType where SKU in(" + ids.Trim(',') + ") and IsQue=1 and OId In(select Id from OrderType where IsOutOfStock=1 and Status<>'作废订单')") .List <OrderProductType>(); foreach (var p in products) { PurchaseData data = new PurchaseData(); data.ItemName = p.ProductName; data.SKU = p.SKU; data.SPic = p.SPicUrl; data.SevenDay = p.SevenDay; data.FifteenDay = p.Fifteen; data.ThirtyDay = p.ThirtyDay; data.WarningQty = Convert.ToInt32(Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 0) * 5); if (data.WarningQty < 1) { data.WarningQty = 1; } data.IsImportant = 0; data.AvgQty = Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 2); foreach (var objectes in SKUCount) { if (objectes[0].ToString().ToUpper() == data.SKU.ToUpper()) { data.NowQty = Convert.ToInt32(objectes[1]); break; } } if (Math.Round(((p.SevenDay / 7) * 0.5 + p.Fifteen / 15 * 0.3 + p.ThirtyDay / 30 * 0.2), 0) * 3 < data.NowQty) { data.IsImportant = 1; } int buyQty = plans.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.DaoQty); data.BuyQty = plans.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.Qty) - buyQty; data.QueQty = orderProducts.Where(x => x.SKU.Trim().ToUpper() == p.SKU.Trim().ToUpper()).Sum(x => x.Qty); if ((data.NowQty + data.BuyQty - data.WarningQty - data.QueQty) < 0) { data.NeedQty = Convert.ToInt32(data.AvgQty * p.DayByStock) + data.QueQty - data.NowQty - data.BuyQty; if (data.NeedQty > 0) { list.Add(data); } } } return(list); }
private void GetDetailsById(int orderId) { purchaseData = new PurchaseData(); DS = new DataSet(); order = new Order(); string result = string.Empty; order.OrderId = orderId; order.Flag = 2; //for getting Order Details DS = purchaseData.GetOrderList(order); if (!Comman.Comman.IsDataSetEmpty(DS)) { StringBuilder sb = new StringBuilder(); sb.Append("<style type='text / css'>"); sb.Append(".tg { border - collapse:collapse; border - spacing:0; border: none; } .dispnone {display:none;} "); sb.Append("</style>"); sb.Append("<table class='tg style1' style='page-break-inside:avoid; align:center;'>"); sb.Append("<colgroup>"); sb.Append("<col style = 'width:50px'>"); sb.Append("<col style = 'width:220px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:80px'>"); sb.Append("<col style = 'width:80px'>"); sb.Append("<col style = 'width:80px'>"); sb.Append("<col style = 'width:80px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("</colgroup>"); sb.Append("<tr>"); sb.Append("<th class='tg-yw4l' rowspan='3' style='border-bottom:1px solid'>"); sb.Append("<img src='/Theme/img/logo1.png' class='img-circle' alt='Logo' width='50px' hight='50px'>"); sb.Append("</th>"); sb.Append("<th class='tg-baqh' colspan='6' style='text-align:center'>"); sb.Append("<u>Purchase Order </u> <br/>"); sb.Append("</th>"); sb.Append("<th class='tg-yw4l' colspan='3' style='text-align:right'>"); sb.Append("GSTIN: 33AAECN2463R1Z2<br>"); sb.Append("</th>"); sb.Append("</tr>"); sb.Append("<tr >"); sb.Append("<td class='tg-yw4l' colspan='6' style='text-align:center; Font-size:15px'>"); sb.Append("<b>Nanjil Integrated Dairy Development</b>"); sb.Append("</td>"); sb.Append("<td class='tg-yw4l' style='text-align:right'>"); sb.Append("CST: 1078823"); sb.Append("</td>"); sb.Append("</tr>"); sb.Append("<tr style='border-bottom:1px solid'>"); sb.Append("<td class='tg-yw4l' colspan='6' style='text-align:center'>"); sb.Append("<b>5/15, Mulagumoodu, Kanyakumari-629167, TamilNadu,India</b>"); sb.Append("</td>"); sb.Append("<td class='tg-yw4l' style='text-align:right'>"); sb.Append("PH:248370,248605"); sb.Append("</td>"); sb.Append("</tr>"); sb.Append("<tr> <td colspan='8' style=text-align:right; padding-top:10px>"); sb.Append("Order No: NIDD-PO-" + DS.Tables[0].Rows[0]["OrderId"]); sb.Append("</td></tr>"); sb.Append("<tr> <td colspan='8' style=text-align:right; padding-top:10px>"); sb.Append("Date : " + DateTime.Now.ToLongDateString()); sb.Append("</td></tr>"); sb.Append("<tr> <td style=text-align:right> To, </td> </tr>"); sb.Append("<tr> <td>   </td> <td colspan=3> <b>"); sb.Append(DS.Tables[0].Rows[0]["VendorCode"] + " " + DS.Tables[0].Rows[0]["VendorName"]); sb.Append("</b> </td></tr>"); sb.Append("<tr> <td>   </td> <td colspan=3>"); sb.Append(DS.Tables[0].Rows[0]["Address"]); sb.Append("</td></tr>"); sb.Append("<tr> <td>   </td> <td colspan=3>"); sb.Append(DS.Tables[0].Rows[0]["City"]); sb.Append("</td></tr>"); sb.Append("<tr> <td>   </td> <td colspan=3>"); sb.Append(DS.Tables[0].Rows[0]["State"]); sb.Append("</td></tr>"); sb.Append("<tr> <td>   </td> <td colspan=3> Phone:"); sb.Append(DS.Tables[0].Rows[0]["Mobile"] + " , " + DS.Tables[0].Rows[0]["Phone"]); sb.Append("</td></tr>"); sb.Append("<tr> <td>   </td> <td colspan=3> Email: "); sb.Append(DS.Tables[0].Rows[0]["Email"]); sb.Append("</td></tr>"); sb.Append("<tr><td> </td><tr>"); sb.Append("<tr> <td style=text-align:right> <b> Dear Sir </b> </td></tr>"); sb.Append("<tr><td> </td> <td colspan='5'> <b> We are placing the order for followings </b> </td></tr>"); sb.Append("<tr style='border:solid;border-width:1px;'> <td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Sr.No</td> <td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Items</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Quantity</td> <td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Rate</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Excise</td> <td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>CST</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>VAT</td> <td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>Amount </td> </tr>"); foreach (DataRow row in DS.Tables[1].Rows) { sb.Append("<tr style='border:solid;border-width:1px;'>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["srno"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["ItemName"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["Quantity"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(Convert.ToDecimal(row["Price"]).ToString("#0.00") + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["Excise"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["CST"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(row["VAT"].ToString() + "</td>"); sb.Append("<td style='border:solid;border-width:1px;padding:1px; padding-left:3px'>"); sb.Append(Convert.ToDecimal(row["Amt"]).ToString("#0.00") + "</td>"); sb.Append("</tr>"); } sb.Append("<tr><td> </td><tr>"); sb.Append("<tr><td> </td><tr>"); sb.Append("<tr> <td colspan='4'> <b><u> Terms and Conditions </u></b></td></tr>"); sb.Append("<tr> <td> </td> <td> <b> Frieght : </b>" + DS.Tables[0].Rows[0]["Frieght"] + "</td></tr>"); sb.Append("<tr> <td> </td> <td> <b> Payment Terms : </b>" + DS.Tables[0].Rows[0]["PaymentTerms"] + "</td></tr>"); sb.Append("<tr> <td> </td> <td colspan='5'> <b> Billing & Delivery Address : Nanjil Integrated Dairy Development </b></td></tr>"); sb.Append("<tr> <td> </td> <td> <b> Amount : </b>" + Convert.ToDecimal(DS.Tables[0].Rows[0]["TotalAmt"]).ToString("#0.00") + "</td></tr>"); sb.Append("<tr> <td> </td> <td> <b> Required Date : </b>" + DS.Tables[0].Rows[0]["TillDate"] + "</td></tr>"); sb.Append("<tr> <td> </td> <td> <b> Transportation Damage : </b>" + DS.Tables[0].Rows[0]["TransDamage"] + "</td></tr>"); sb.Append("<tr><td> </td><tr>"); sb.Append("<tr> <td colspan='4'>   </td> <td colspan='4' style='text-align:center'> Yours Sincerely </td> </td>"); sb.Append("<tr> <td colspan='4'>   </td> <td colspan='4' style='text-align:center'> <b>For Nanjil Integrated Dairy Development</b> </td> </td>"); sb.Append("<tr><td> </td><tr>"); sb.Append("<tr><td> </td><tr>"); if (Convert.ToDecimal(DS.Tables[0].Rows[0]["TotalAmt"]) > 49999) { sb.Append("<tr> <td colspan='4'>   </td> <td colspan='4' style='text-align:center'><b> Managing Director</b></td> </td>"); } else { sb.Append("<tr> <td colspan='4'>   </td> <td colspan='4' style='text-align:center'><b> Purchase Manager</b></td> </td>"); } sb.Append(""); sb.Append(""); sb.Append(""); result = sb.ToString(); RequestDetails.Text = result; Session["ctrl"] = pnlRequestDetails; } }
private async Task <Course> GetCourseInfo(long courseId, string couponCode) { Course course = new Course { CourseId = courseId }; string url = $"https://www.udemy.com/api-2.0/course-landing-components/{courseId}/me/?couponCode={couponCode}&components=purchase"; using HttpClient client = new HttpClient(); HttpResponseMessage response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { string json = await response.Content.ReadAsStringAsync(); PurchaseInfo purchase = JsonSerializer.Deserialize <PurchaseInfo>(json); if (purchase != null) { PurchaseData purchaseData = purchase.purchase?.data; if (purchaseData != null) { try { course.EndTime = DateTime.ParseExact(purchaseData.pricing_result.campaign.end_time.Substring(0, 16), "yyyy-MM-dd HH:mm", System.Globalization.CultureInfo.InvariantCulture); } catch (Exception) { } course.OriginalPrice = purchaseData.pricing_result.list_price.price_string; course.DiscountedPrice = purchaseData.pricing_result.price.price_string; course.Originalmount = purchaseData.pricing_result.list_price.amount; course.Amount = purchaseData.pricing_result.price.amount; course.Discount_percent = purchaseData.pricing_result.discount_percent; if (course.OriginalPrice.Equals(course.DiscountedPrice)) { return(null); } if (course.Discount_percent == 0) { course.Discount_percent = (course.Originalmount - course.Amount) / course.Originalmount * 100; } } else { return(null); } } else { return(null); } } url = $"https://www.udemy.com/api-2.0/courses/{courseId}/?fields[course]=title,description,headline,avg_rating_recent,objectives_summary,target_audiences,image_200_H,primary_category,prerequisites"; response = await client.GetAsync(url); if (response.IsSuccessStatusCode) { string json = await response.Content.ReadAsStringAsync(); CourseInfo courseInfo = JsonSerializer.Deserialize <CourseInfo>(json); if (courseInfo != null) { course.Title = courseInfo.title; course.Headline = courseInfo.headline; course.Description = courseInfo.description; course.Avg_rating_recent = courseInfo.avg_rating_recent; course.Objectives_summary = courseInfo.objectives_summary; course.Target_audiences = courseInfo.target_audiences; course.Image_200_H = courseInfo.image_200_H; course.Category = courseInfo.primary_category.title; course.Prerequisites = courseInfo.prerequisites; } else { return(null); } } return(course); }
public static void Consume(PurchaseData purchaseData) { inap.Consume(purchaseData.productId); }
public AjaxResponse SavePurchaseInfo(QuoteHeader qHeader, PurchaseData pData) { #region Legacy Business Logic Ported code this.PData = pData; this.PurchaseProcessor.SavePhoneNumber(); this.PurchaseProcessor.SaveMailingAddress(); this.PurchaseProcessor.SaveMortgageInfo(); this.PurchaseProcessor.SaveConsentToRate(out this.ErrorMessage); this.PurchaseProcessor.SavexWind(out this.ErrorMessage); // ITR#7684 this.PurchaseProcessor.SaveConsentToRateAndxWind(out this.ErrorMessage); // ITR#7684 this.PurchaseProcessor.SavePaymentDetails(); this.DataBinder.SaveDataObjects(); #endregion this.Log("SavePurchaseInfo - before saving Quote... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); return this.SaveQuote(); }
public AjaxResponse Purchase(QuoteHeader qHeader, PurchaseData pData) { //ITR#7841 Horison Audits - Web 2.0 Time-out AjaxResponse response = new AjaxResponse(); if (Convert.ToDateTime(DataBinder.QHeader.PolicyEffectiveDate) <= DateTime.Today) { response.quoteHeader = qHeader; response.quoteHeader.SystemDate = DateTime.Today.ToString(); response.quoteHeader.ExpiredQuote = true; response.quoteHeader.IsRetrieve = false; if (qHeader.FormCode == 3) { response.NextPanel = AjaxPanel.Your_Address; response.quoteHeader.LandingStep = "Your_Address"; response.RedirectURL = "BeginQuote.aspx"; } else if (qHeader.FormCode == 6) { response.NextPanel = AjaxPanel.Condo_Information; response.RedirectURL = "iQuote.aspx"; } else if (qHeader.FormCode == 4) { response.NextPanel = AjaxPanel.About_You; response.RedirectURL = "iQuote.aspx"; } } else { // ITR#7455 Adding Logging for DwellingUseCd and EstimatedReplCost. string logDwellingMessage; if (this.DataBinder.Structure.DwellingUseCd == null) { logDwellingMessage = "DwellingUseCd was Null prior to the refresh, "; } else { logDwellingMessage = "DwellingUseCd was " + this.DataBinder.Structure.DwellingUseCd.ToString() + " prior to the refresh, "; } string logReplacementCostMessage; if (this.DataBinder.Coverage.EstimatedReplCostAmt == null) { logReplacementCostMessage = "EstimatedReplCostAmt was Null prior to the refresh, "; } else { logReplacementCostMessage = "EstimatedReplCostAmt was " + this.DataBinder.Coverage.EstimatedReplCostAmt.ToString() + " prior to the refresh, "; } // Refresh the DataBinder so that if we are coming from a different server we have the latest from the database. this.DataBinder.RefreshDataObjects(); this.Log("Processing Purchase - Start... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); //this.quote = null; //Added For inspection this.BusinessLogic().Quote = null; this.Log("Processing Purchase - After refreshing the quote object... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); this.ErrorMessage = string.Empty; //AjaxResponse response = new AjaxResponse(); #region Legacy Business Logic Ported code this.PData = pData; this.PurchaseProcessor.SaveConsentToRate(out this.ErrorMessage); this.PurchaseProcessor.SavexWind(out this.ErrorMessage); // ITR#7684 this.PurchaseProcessor.SaveConsentToRateAndxWind(out this.ErrorMessage); // ITR#7684 if (string.IsNullOrEmpty(this.ErrorMessage)) { this.PurchaseProcessor.SavePhoneNumber(); this.PurchaseProcessor.SaveMailingAddress(); this.PurchaseProcessor.SaveMortgageInfo(); if (pData.routingNumber != null && !PurchaseProcessor.ValidateEFT(pData.routingNumber)) { this.ErrorMessage = "<strong>There is a problem with your answers below. We may have some missing or inaccurate information. Please check the following field(s):</strong><a href='#RoutingNumber'>Routing Number</a>"; this.Log("Processing Purchase - Payment = AutoCheck... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); } if (string.IsNullOrEmpty(ErrorMessage)) { this.PurchaseProcessor.SavePaymentDetails(); // ITR#7455 Added logging for the Early Cash issue if (this.DataBinder.Structure.DwellingUseCd == null) { logDwellingMessage += "and DwellingUseCd was Null after to the refresh."; } else { logDwellingMessage += "and DwellingUseCd was " + this.DataBinder.Structure.DwellingUseCd.ToString() + " after to the refresh."; } if (this.DataBinder.Coverage.EstimatedReplCostAmt == null) { logReplacementCostMessage += "and EstimatedReplCostAmt was Null after to the refresh,"; } else { logReplacementCostMessage += "and EstimatedReplCostAmt was " + this.DataBinder.Coverage.EstimatedReplCostAmt.ToString() + " after to the refresh"; } // Log the above results this.Log(logDwellingMessage); this.Log(logReplacementCostMessage); this.DataBinder.SaveDataObjects(); this.Log("Processing Purchase - Data Objects Saved... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); if (this.BusinessLogic().Quote.APLUSStatus == null) { this.BusinessLogic().Quote.APLUSStatus = 2; this.BusinessLogic().Quote.Save(); this.Log("Processing Purchase - Quote Saved... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); } } #endregion #region Legacy Progressive Business Logic Ported Code } if (string.IsNullOrEmpty(this.ErrorMessage)) { this.DataBinder.RefreshDataObjects(); if (!this.ServiceInterface.CallSaveQuoteService()) { response.errorOccured = true; response.errorMessage = "Error processing payment details. (save quote)"; response.NextPanel = AjaxPanel.Purchase; this.Log("Processing Purchase - CallSaveQuoteService() = False... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); return response; } if (quote.APLUSStatus != 1) { //bool convertEnabled = this.PurchaseProcessor.ConvertEnabled(); //if (convertEnabled) this.ServiceInterface.CallConvertService(); this.Log("PartnerId: " + this.BusinessLogic().QHeader.PartnerId + " CompanyPolicyNumber: " + quote.CompanysPolicyNumber + " OLSStatus: " + this.BusinessLogic().QHeader.OLSStatus); if (this.BusinessLogic().QHeader.PartnerId == 2319 && !string.IsNullOrEmpty(quote.CompanysPolicyNumber) && this.BusinessLogic().QHeader.OLSStatus == OlsStatusPasswordVerified) { EnrollmentServiceClient enrollmentService = null; try { this.Log("Enrollment Service Being called"); string email = DirectWebDAC.GetOLSEnrollmentValues(qHeader.QuoteNumber).Rows[0]["EmailAddress"]. ToString(); enrollmentService = new EnrollmentServiceClient(); EnrollForSelfServiceRequest request = new EnrollForSelfServiceRequest(); request.PolicyNumber = quote.CompanysPolicyNumber; request.Channel = EnrollmentChannel.ConsumerWeb; PasswordProvider provider = new PasswordProvider(); provider.LoginId = email; provider.Password = this.BusinessLogic().PData.password; request.Authentication = provider; request.RequestId = DirectWebDAC.GetOLSEnrollmentValues(qHeader.QuoteNumber).Rows[0]["Token"].ToString(); request.RequestType = OLSService.ValidationRequestType.Token; request.TransactionID = Guid.NewGuid(); var result = enrollmentService.EnrollForSelfService(request); if (result.Result) { this.Log("Enrollment into OLS was sucessful. Policy Number: " + this.BusinessLogic().Quote.CompanysPolicyNumber); this.BusinessLogic().QHeader.OLSStatus = OlsStatusReadyToEnroll; } else { this.Log("Enrollment into OLS was unsucessful. Error Message: " + result.ErrorMessage); } } catch (Exception e) { this.Log("Error with enrollmentservice: " + e.Message); } finally { if (enrollmentService != null) enrollmentService.Close(); this.Log("Enrollment Service ended OLSStatus: " + this.BusinessLogic().QHeader.OLSStatus); } } this.Log("Processing Purchase - After CallConvertService... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); } else { throw new Exception("Fix Me."); } } #endregion this.DataBinder.RefreshDataObjects(); this.Log("Processing Purchase - After RefreshDataObjects... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); // interpret results... if (this.ErrorMessage.Length == 0 && this.ServiceInterface.ErrorMessage.Length == 0 && this.PurchaseProcessor.ErrorMessage.Length == 0) { response.NextPanel = AjaxPanel.Thank_You; this.Log("Processing Purchase - Thank You... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); } else { response.NextPanel = AjaxPanel.Purchase; if (this.ErrorMessage.Length != 0) response.errorMessage = this.ErrorMessage; else if (this.ServiceInterface.ErrorMessage.Length != 0) response.errorMessage = this.ServiceInterface.ErrorMessage; else if (this.PurchaseProcessor.ErrorMessage.Length != 0) response.errorMessage = this.PurchaseProcessor.ErrorMessage; response.errorOccured = true; this.Log("Processing Purchase - Error... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); if (response.errorMessage.Trim().Length > 0) this.Log("Processing Purchase - Error Description : " + response.errorMessage.Trim()); } // check for policy servicing redirect after successful purchase if (response.NextPanel == AjaxPanel.Thank_You) { IQuoteConfiguration configuration = IQuoteConfiguration.GetConfigurationInstance(); // If user OLS Status == 5 then user is enrolled in OLS // this is for Walmart Associate if (qHeader.OLSStatus == OlsStatusReadyToEnroll && !(DirectWebDAC.IsBatchRunning())) { this.Log("Processing Purchase - OnlineServicingEnabled... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); if (this.PurchaseProcessor.WritePolicyServicingTransferData()) { this.Log( "Processing Purchase - WritePolicyServicingTransferData() = True... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); //Redirect to OLSEnrolled page instead of OnlineServicing thank you page StringBuilder redirUrl = this.PurchaseProcessor.BuildOLSEnrolledRedirectUrl(); response.RedirectURL = redirUrl.ToString(); } } else if (configuration.FunctionalityEnabled("OnlineServicingEnabled") && !(DirectWebDAC.IsBatchRunning())) { this.Log("Processing Purchase - OnlineServicingEnabled... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); if (this.PurchaseProcessor.WritePolicyServicingTransferData()) { this.Log( "Processing Purchase - WritePolicyServicingTransferData() = True... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); StringBuilder redirUrl = this.PurchaseProcessor.BuildOnlineServicingRedirectUrl(); response.RedirectURL = redirUrl.ToString(); } } } this.Log("Processing Purchase - End of Purchase... Inspection Result value = " + this.BusinessLogic().Quote.InspectionResult.ToString()); } return response; }
public Stream MakePurchases(string customer, PurchaseData[] data) { try { var invoker = _h.Authorize(); AccountTypes.Account account = ControlledAccount.getByUsername(invoker, customer); List<uint> returnList = new List<uint>(); // TODO: Only do these things, if they are known not to fail. Undo rents/buys made before error. foreach (PurchaseData p in data) { ProductTypes.Product product = ControlledProduct.getProductById(invoker, (int) p.product); if (!product.published) return _h.Failure(409); if (p.purchased.Equals("B")) { var result = _h.OrNull(ControlledCredits.buyProduct(invoker, account, product)); if(result != null) returnList.Add((uint) result.item.id); } else if (p.purchased.Equals("R")) { var result = _h.OrNull(ControlledCredits.rentProduct(invoker, account, product, 7)); // Rented products are always rented for 7 days by default if (result != null) returnList.Add((uint)result.item.id); } else return _h.Failure(400); // Invalid letter } if (returnList.Count == 0) return _h.Failure(400); // Empty list _h.Success(); return _j.Json(returnList); } catch (ProductExceptions.ArgumentException) { return _h.Failure(400); } catch (CreditsExceptions.NotEnoughCredits) { return _h.Failure(402); } catch (PermissionExceptions.AccountBanned) { return _h.Failure(403); } catch (PermissionExceptions.PermissionDenied) { return _h.Failure(403); } catch (ProductExceptions.NoSuchProduct) { return _h.Failure(409); } catch (AccountExceptions.NoSuchUser) { return _h.Failure(404); } catch (Exception) { return _h.Failure(500); } }
private static int getUnitMultiplier(PurchaseData purchaseData) { return(PaymentController.purchaseConfig.currencyToMultiplier[purchaseData.price.currency]); }
void VirtualCurrencyPurchaseComplete(PurchaseData purchaseData) { _storeController.RefreshInventory(); _storeController.RefreshVirtualCurrencyBalance(); }
public static void Purchase(PurchaseData purchaseData) { inap.Purchase(purchaseData.productId); }
public void Insert(PurchaseData PurchaseData) { var sql = $@"insert into PurchaseData( Goods_ID, Goods_Name, Date, Unit, Specification, GoodsType, Brand, Quantity, UnitPrice, Sum, Total, Remarks, Supplier_ID, Supplier_Name, Supplier_Address, Warehouse_ID, Warehouse_Name, InventoryData_ID, Active, Freight) VALUES ( @GoodsID, @GoodsName, @Date, @Unit, @Specification, @GoodsType, @Brand, @Quantity, @UnitPrice, @Sum, @Total, @Remarks, @SupplierID, @SupplierName, @SupplierAddress, @WarehouseID, @WarehouseName, @InventoryDataID, @Active, @Freight)"; _context.Execute(sql, new { GoodsID = PurchaseData.GoodsID, GoodsName = PurchaseData.GoodsName, Date = PurchaseData.Date, Unit = PurchaseData.Unit, Specification = PurchaseData.Specification, GoodsType = PurchaseData.GoodsType, Brand = PurchaseData.Brand, Quantity = PurchaseData.Quantity, UnitPrice = PurchaseData.UnitPrice, Sum = PurchaseData.Sum, Total = PurchaseData.Total, Remarks = PurchaseData.Remarks, SupplierID = PurchaseData.SupplierID, SupplierName = PurchaseData.SupplierName, SupplierAddress = PurchaseData.SupplierAddress, WarehouseID = PurchaseData.WarehouseID, WarehouseName = PurchaseData.WarehouseName, InventoryDataID = PurchaseData.InventoryDataID, Active = PurchaseData.Active, Freight = PurchaseData.Freight }); }
private Purchase(PurchaseData purchaseData, string jsonPurchaseData, string signature) { _purchaseData = purchaseData; _identifiers = new Identifiers(_purchaseData.obfuscatedAccountId, _purchaseData.obfuscatedProfileId); _purchaseReceipt = new PurchaseReceipt(jsonPurchaseData, signature); }
public AndConstraint <RecordAssertions> ExistsCorrectlyInDbWithCredirCardInvalid(PurchaseData purchaseDataToSend) { _purchaseDataRecieve.Should().AllCorrectButValidAndWhy(purchaseDataToSend); _purchaseDataRecieve.IsValid.Should().Be("False"); _purchaseDataRecieve.WhyInvalid.Should().Be("The credit card number is not valid"); return(new AndConstraint <RecordAssertions>(this)); }
protected PurchasableItemSkinnerBoxItemInfo() { PurchaseDatas = new PurchaseData[0]; }
private void GetDetailsById(int requestId) { purchaseData = new PurchaseData(); DS = new DataSet(); request = new Request(); string result = string.Empty; request.RequestId = requestId; request.Flag = 2; //for getting Request Details DS = purchaseData.GetRequestList(request); if (!Comman.Comman.IsDataSetEmpty(DS)) { StringBuilder sb = new StringBuilder(); if (DS.Tables[1].Rows[0]["ReqStatus"].ToString() != "Pending") { dpReqStatus.Visible = false; BtnSubmitStatus.Visible = false; } else { dpReqStatus.Visible = true; BtnSubmitStatus.Visible = true; } lblReqStatus.Text = "Status " + DS.Tables[1].Rows[0]["ReqStatus"].ToString(); sb.Append("<style type='text / css'>"); sb.Append(".tg { border - collapse:collapse; border - spacing:0; border: none; } .dispnone {display:none;}"); sb.Append("</style>"); sb.Append("<table class='tg style1' style='page-break-inside:avoid; align:center;'>"); sb.Append("<colgroup>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("<col style = 'width:100px'>"); sb.Append("</colgroup>"); sb.Append("<tr>"); sb.Append("<th class='tg-yw4l' rowspan='2' style='border-bottom:1px solid'>"); sb.Append("<img src='/Theme/img/logo1.png' class='img-circle' alt='Logo' width='50px' hight='50px'>"); sb.Append("</th>"); sb.Append("<th class='tg-baqh' colspan='6' style='text-align:center'>"); sb.Append("<u>Purchase Request </u> <br/>"); sb.Append("</th>"); sb.Append("<th class='tg-yw4l' colspan='3' style='text-align:right'>"); sb.Append("GSTIN: 33AAECN2463R1Z2<br>"); sb.Append("</th>"); sb.Append("</tr>"); sb.Append("<tr style='border-bottom:1px solid'>"); sb.Append("<td class='tg-yw4l' colspan='6' style='text-align:center'>"); sb.Append("<b>Nanjil Integrated Dairy Development, Mulagumoodu, K.K.Dt.</b>"); sb.Append("</td>"); sb.Append("<td class='tg-yw4l' style='text-align:right'>"); sb.Append("PH:248370,248605"); sb.Append("</td>"); sb.Append("<tr style='border-bottom:1px solid'><td colspan='3'>"); sb.Append("Request Date :" + (Convert.ToDateTime(DS.Tables[1].Rows[0]["ReqDate"])).ToString("dd-MM-yyyy")); sb.Append("</td>"); sb.Append("<td colspan='2' style='text-align:center'>"); sb.Append("Status: <b>" + DS.Tables[0].Rows[0]["ReqStatus"] + "</b>"); sb.Append("</td>"); sb.Append("<td colspan='3' style='text-align:right'>"); sb.Append("Request By: " + DS.Tables[1].Rows[0]["EmployeeCode"] + " " + DS.Tables[1].Rows[0]["EmployeeName"]); sb.Append("</td>"); sb.Append("</tr>"); sb.Append("<tr style='border-bottom:1px solid'>"); sb.Append("<td> Sr.No </td>"); sb.Append("<td colspan='2'>Item</td>"); sb.Append("<td>Quantity</td>"); sb.Append("<td>Stock</td>"); sb.Append("<td>Specification</td>"); sb.Append("<td>Purpose</td>"); sb.Append("<td>Remarks</td></tr>"); foreach (DataRow row in DS.Tables[0].Rows) { sb.Append("<tr> <td>"); sb.Append(row["srno"].ToString()); sb.Append("</td> <td colspan='2'> "); sb.Append(row["ItemName"].ToString()); sb.Append("</td> <td> "); sb.Append(row["Quantity"].ToString() + " " + row["UnitName"].ToString()); sb.Append("</td> <td> "); sb.Append(row["Stock"].ToString()); sb.Append("</td> <td> "); sb.Append(row["Specification"].ToString()); sb.Append("</td> <td> "); sb.Append(row["Purpose"].ToString()); sb.Append("</td> <td> "); sb.Append(row["Remark"].ToString()); sb.Append("</td> </tr> "); } sb.Append("<tr style='border-top:1px solid'> <td colspan='8'> </td> </tr>"); sb.Append("<tr> <td colspan='8'> </td></tr>"); sb.Append("<tr> <td colspan='4'> Request By: " + DS.Tables[1].Rows[0]["EmployeeCode"] + " " + DS.Tables[1].Rows[0]["EmployeeName"]); sb.Append("</td> "); try { string temp = DS.Tables[0].Rows[0]["ReqStatus"].ToString(); if (temp == "Pending") { sb.Append("<td colspan='4' > "); sb.Append("</td> "); } if (temp == "Approved") { sb.Append("<td colspan='4' > Approved By: " + DS.Tables[2].Rows[0]["EmployeeCode"] + " " + DS.Tables[2].Rows[0]["EmployeeName"]); sb.Append("</td> "); } if (temp == "Rejected") { sb.Append("<td colspan='4' > Rejected By: " + DS.Tables[2].Rows[0]["EmployeeCode"] + " " + DS.Tables[2].Rows[0]["EmployeeName"]); sb.Append("</td> "); } } catch (Exception) { sb.Append("<td colspan='4' > "); sb.Append("</td> "); } sb.Append("</tr>"); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); sb.Append(""); result = sb.ToString(); RequestDetails.Text = result; Session["ctrl"] = pnlRequestDetails; } }
public BundlePurchasableItemInfo() { PurchaseDatas = new PurchaseData[0]; }
private void Menu() { scoreInCorner.SetText(money.ToString()); if (!settingsOpened && !shopOpen) { MenuPanel.SetActive(true); ShopPanel.SetActive(false); BackDropPanel.SetActive(false); BallPanel.SetActive(false); BarPanel.SetActive(false); SettingsPanel.SetActive(false); if (playButton.clicked) { SceneManager.LoadScene("IcbGame"); } if (shopButton.clicked) { shopButton.clicked = false; shopOpen = true; } if (settingsButton.clicked) { settingsButton.clicked = false; settingsOpened = true; } } else if (shopOpen) { if (backDropButton.clicked) { ShopPanel.SetActive(false); BackDropPanel.SetActive(true); if (backDropCloseButton.clicked || ClosePanelTouchCheck(backDropClosePanelButtons)) { backDropButton.clicked = false; backDropCloseButton.clicked = false; BackDropPanel.SetActive(false); } } else if (ballButton.clicked) { ShopPanel.SetActive(false); BallPanel.SetActive(true); if (ballCloseButton.clicked || ClosePanelTouchCheck(ballClosePanelButtons)) { ballButton.clicked = false; ballCloseButton.clicked = false; BallPanel.SetActive(false); } } else if (barButton.clicked) { ShopPanel.SetActive(false); BarPanel.SetActive(true); if (barCloseButton.clicked || ClosePanelTouchCheck(barClosePanelButtons)) { barButton.clicked = false; barCloseButton.clicked = false; BarPanel.SetActive(false); } } else if (closeShopButton.clicked || ClosePanelTouchCheck(closeShopPanelButton)) { closeShopButton.clicked = false; shopOpen = false; } else { MenuPanel.SetActive(false); ShopPanel.SetActive(true); SettingsPanel.SetActive(false); } } else if (settingsOpened) { MenuPanel.SetActive(false); BackDropPanel.SetActive(false); SettingsPanel.SetActive(true); if (flipControlsButton.clicked) { rotate = !rotate; SaveSystem.SavePlayer(this); flipControlsButton.clicked = false; } if (resetButton.clicked) { resetingEverything = true; currentEquipped = new int[] { 0, 0, 0 }; SaveSystem.SavePlayer(this); PurchaseData resetData = new PurchaseData(); SaveSystem.SavePurchase(resetData); resetingEverything = false; money = SaveSystem.LoadPlayer().money; GameObject.Find("Spawnner").GetComponent <BoardSpawner>().UpdateStyles(currentEquipped); BackDropPanel.SetActive(true); BackDropPanel.GetComponent <StoreScript>().purchasedItems = SaveSystem.LoadPurchase().ownBoards; BackDropPanel.SetActive(false); resetButton.clicked = false; } if (closeSettingsButton.clicked || ClosePanelTouchCheck(closeSettingsPanelButton)) { closeSettingsButton.clicked = false; settingsOpened = false; } if (!waitALoop) { if (rotate) { flipControlsButton.UpdateText("Rotate"); } else { flipControlsButton.UpdateText("Raise Sides"); } } else { waitALoop = false; } } }
// update database row using the current values public void UpdateFromCurrent(SqlTransaction trans) { PurchaseData dao = new PurchaseData(ConnStr, trans); dao.Update(Id, UserId, ProductId); }
protected void btnSubmit_Click(object sender, EventArgs e) { foreach (RepeaterItem item in rpAgentOrderdetails.Items) { TextBox txtReceivedQty = item.FindControl("txtReceivedQty") as TextBox; TextBox txtAcceptedQty = item.FindControl("txtAcceptedQty") as TextBox; TextBox txtRejectedQty = item.FindControl("txtRejectedQty") as TextBox; Label lblQuantity = item.FindControl("lblQuantity") as Label; Label lblPrice = item.FindControl("lblPrice") as Label; Label lbltotal = item.FindControl("lbltotal") as Label; HiddenField hfItemId = item.FindControl("hfItemId") as HiddenField; HiddenField hfId = item.FindControl("hfOrderDetailsId") as HiddenField; HiddenField hfCst = item.FindControl("hfCst") as HiddenField; HiddenField hfExcise = item.FindControl("hfExcise") as HiddenField; HiddenField hfVat = item.FindControl("hfVat") as HiddenField; if (hfId != null) { mrnDetails = new MRNDetails(); purchaseData = new PurchaseData(); mrnDetails.ItemId = Convert.ToInt32(hfItemId.Value); mrnDetails.OrderDetailsId = Convert.ToInt32(hfId.Value); mrnDetails.OrderedQty = Convert.ToDouble(lblQuantity.Text); mrnDetails.ReceivedQty = string.IsNullOrEmpty(txtReceivedQty.Text)? 0 : Convert.ToDouble(txtReceivedQty.Text); mrnDetails.AcceptedQty = string.IsNullOrEmpty(txtAcceptedQty.Text) ? 0 : Convert.ToDouble(txtAcceptedQty.Text); mrnDetails.RejectedQty = string.IsNullOrEmpty(txtRejectedQty.Text) ? 0 : Convert.ToDouble(txtRejectedQty.Text); mrnDetails.Price = Convert.ToDecimal(lblPrice.Text); mrnDetails.Cst = Convert.ToDouble(hfCst.Value); mrnDetails.Excise = Convert.ToDouble(hfExcise.Value); mrnDetails.Vat = Convert.ToDouble(hfVat.Value); mrnDetails.Amount = Convert.ToDecimal(lbltotal.Text); mrnDetails.Flag = 1; purchaseData.MrnDML(mrnDetails); } } mrn = new MRN(); mrn.BillDate = (Convert.ToDateTime(txtBillDate.Text)).ToString("dd-MM-yyyy"); mrn.BillNo = txtBillNumber.Text; mrn.VehicleNo = txtVehicleNo.Text; mrn.PRNo = txtPRNo.Text; mrn.RequiredFor = txtRequiredFor.Text; mrn.Remarks = txtRemarks.Text; mrn.CreatedBy = GlobalInfo.Userid; mrn.ReceivedBy = Convert.ToInt32(dpReceivedBy.SelectedItem.Value); mrn.QCBy = Convert.ToInt32(dpQcBy.SelectedItem.Value); mrn.FinMgr = Convert.ToInt32(dpFinanceMgr.SelectedItem.Value); mrn.ApprovedBy = Convert.ToInt32(dpApprovedBy.SelectedItem.Value); mrn.OrderId = Convert.ToInt32(dpPOCode.SelectedItem.Value); mrn.TotalAmt = Convert.ToDecimal(hftotalAmout.Value); bool result = purchaseData.MrnDML2(mrn); if (result) { ClearTexboxes(); divDanger.Visible = false; divwarning.Visible = false; divSusccess.Visible = true; lblSuccess.Text = "Material Received Note Submitted Successfully"; pnlError.Update(); upMain.Update(); } else { divDanger.Visible = false; divwarning.Visible = true; divSusccess.Visible = false; lblwarning.Text = "Please Contact to Site Admin"; pnlError.Update(); } }
// list all rows from table public DataSet List() { PurchaseData dao = new PurchaseData(ConnStr); return(dao.List()); }
public void SetData(PurchaseData data) { PurchaseIndex = data.Index; CommonFunc.SetImageFile(TextureCacheManager.Instance.GetTexture(data.ThumbnailURL), ref PurchaseIconImg); RefreshUIAction = null; }
void Handle(PurchaseData data) { currentRoundState.Purchases.Add(data); }