Exemplo n.º 1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (AccountNumber == null ? 0 : AccountNumber.GetHashCode());
         hash = hash * 23 + (BillToAddressId == default(int) ? 0 : BillToAddressId.GetHashCode());
         hash = hash * 23 + (Comment == null ? 0 : Comment.GetHashCode());
         hash = hash * 23 + (CreditCardApprovalCode == null ? 0 : CreditCardApprovalCode.GetHashCode());
         hash = hash * 23 + (CreditCardId == null ? 0 : CreditCardId.GetHashCode());
         hash = hash * 23 + (CurrencyRateId == null ? 0 : CurrencyRateId.GetHashCode());
         hash = hash * 23 + (CustomerId == default(int) ? 0 : CustomerId.GetHashCode());
         hash = hash * 23 + (DueDate == default(DateTime) ? 0 : DueDate.GetHashCode());
         hash = hash * 23 + (Freight == default(decimal) ? 0 : Freight.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (OnlineOrderFlag == default(bool) ? 0 : OnlineOrderFlag.GetHashCode());
         hash = hash * 23 + (OrderDate == default(DateTime) ? 0 : OrderDate.GetHashCode());
         hash = hash * 23 + (PurchaseOrderNumber == null ? 0 : PurchaseOrderNumber.GetHashCode());
         hash = hash * 23 + (RevisionNumber == default(byte) ? 0 : RevisionNumber.GetHashCode());
         hash = hash * 23 + (Rowguid == default(Guid) ? 0 : Rowguid.GetHashCode());
         hash = hash * 23 + (SalesOrderNumber == null ? 0 : SalesOrderNumber.GetHashCode());
         hash = hash * 23 + (SalesPersonId == null ? 0 : SalesPersonId.GetHashCode());
         hash = hash * 23 + (ShipDate == null ? 0 : ShipDate.GetHashCode());
         hash = hash * 23 + (ShipMethodId == default(int) ? 0 : ShipMethodId.GetHashCode());
         hash = hash * 23 + (ShipToAddressId == default(int) ? 0 : ShipToAddressId.GetHashCode());
         hash = hash * 23 + (Status == default(byte) ? 0 : Status.GetHashCode());
         hash = hash * 23 + (SubTotal == default(decimal) ? 0 : SubTotal.GetHashCode());
         hash = hash * 23 + (TaxAmt == default(decimal) ? 0 : TaxAmt.GetHashCode());
         hash = hash * 23 + (TerritoryId == null ? 0 : TerritoryId.GetHashCode());
         hash = hash * 23 + (TotalDue == default(decimal) ? 0 : TotalDue.GetHashCode());
         return(hash);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 23 + (EmployeeId == default(int) ? 0 : EmployeeId.GetHashCode());
         hash = hash * 23 + (Freight == default(decimal) ? 0 : Freight.GetHashCode());
         hash = hash * 23 + (ModifiedDate == default(DateTime) ? 0 : ModifiedDate.GetHashCode());
         hash = hash * 23 + (OrderDate == default(DateTime) ? 0 : OrderDate.GetHashCode());
         hash = hash * 23 + (RevisionNumber == default(byte) ? 0 : RevisionNumber.GetHashCode());
         hash = hash * 23 + (ShipDate == null ? 0 : ShipDate.GetHashCode());
         hash = hash * 23 + (ShipMethodId == default(int) ? 0 : ShipMethodId.GetHashCode());
         hash = hash * 23 + (Status == default(byte) ? 0 : Status.GetHashCode());
         hash = hash * 23 + (SubTotal == default(decimal) ? 0 : SubTotal.GetHashCode());
         hash = hash * 23 + (TaxAmt == default(decimal) ? 0 : TaxAmt.GetHashCode());
         hash = hash * 23 + (TotalDue == default(decimal) ? 0 : TotalDue.GetHashCode());
         hash = hash * 23 + (VendorId == default(int) ? 0 : VendorId.GetHashCode());
         return(hash);
     }
 }
Exemplo n.º 3
0
        public string ToPostData()
        {
            string postData = "";

            postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_PAYMENTACTION") + "=" + HttpUtility.UrlEncode(PaymentAction) + "&";
            if (Amt != 0)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_AMT") + "=" + Amt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (CurrencyCode != string.Empty)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_CURRENCYCODE") + "=" + HttpUtility.UrlEncode(CurrencyCode) + "&";
            }
            if (Desc != string.Empty)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_DESC") + "=" + HttpUtility.UrlEncode(Desc) + "&";
            }
            if (ItemAmt != 0)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_ITEMAMT") + "=" + ItemAmt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (TaxAmt != 0)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_TAXAMT") + "=" + TaxAmt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (HandlingAmt != 0)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_HANDLINGAMT") + "=" + HandlingAmt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (ShippingAmt != 0)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_SHIPPINGAMT") + "=" + ShippingAmt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (InvNum != string.Empty)
            {
                postData += HttpUtility.UrlEncode("PAYMENTREQUEST_0_INVNUM") + "=" + HttpUtility.UrlEncode(InvNum) + "&";
            }
            return(postData);
        }
 protected void GridInwordDetails_RowDataBound(object sender, GridViewRowEventArgs e)
 {
     try
     {
         if (e.Row.RowType == DataControlRowType.DataRow && !string.IsNullOrEmpty(Convert.ToString(DataBinder.Eval(e.Row.DataItem, "InwardNo"))))
         {
             // Taxamt += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "DiscAmnt"));
             Amount  += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "Amount"));
             TaxPer  += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TaxPer"));
             TaxAmt  += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "TaxAmount"));
             DiscPer += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "DiscPer"));
             DiscAmt += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "DiscAmt"));
             // amt += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "NetAmnt"));
             NetAmt += Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "NetAmount"));
             if ((Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "InwardRate")) > Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "PORate"))) || (Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "InwardRate")) < Convert.ToDecimal(DataBinder.Eval(e.Row.DataItem, "PORate"))))
             {
                 //e.Row.ForeColor = Color.Red;
                 for (int y = 0; y < e.Row.Cells.Count; y++)
                 {
                     e.Row.Cells[y].ForeColor = System.Drawing.Color.FromName("Red");
                 }
             }
         }
         if (e.Row.RowType == DataControlRowType.Footer)
         {
             e.Row.Cells[13].Text = "Total :";
             e.Row.Cells[14].Text = Amount.ToString("0.00");
             //e.Row.Cells[13].Text = TaxPer.ToString("0.00");
             e.Row.Cells[16].Text = TaxAmt.ToString("0.00");
             //e.Row.Cells[15].Text = DiscPer.ToString("0.00");
             e.Row.Cells[18].Text = DiscAmt.ToString("0.00");
             e.Row.Cells[19].Text = NetAmt.ToString("0.00");
         }
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }
Exemplo n.º 5
0
        public string ToPostData(int index)
        {
            string postData = "";

            if (Name != null)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_NAME" + index.ToString()) + "=" + HttpUtility.UrlEncode(Name) + "&";
            }
            if (Desc != null)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_DESC" + index.ToString()) + "=" + HttpUtility.UrlEncode(Desc) + "&";
            }
            if (Amt != 0)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_AMT" + index.ToString()) + "=" + Amt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (TaxAmt != 0)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_TAXAMT" + index.ToString()) + "=" + TaxAmt.ToString("F", CultureInfo.InvariantCulture) + "&";
            }
            if (Number != 0)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_NUMBER" + index.ToString()) + "=" + Number.ToString(CultureInfo.InvariantCulture) + "&";
            }
            if (Qty != 0)
            {
                postData += HttpUtility.UrlEncode("L_PAYMENTREQUEST_0_QTY" + index.ToString()) + "=" + Qty.ToString(CultureInfo.InvariantCulture) + "&";
            }
            return(postData);
        }