예제 #1
0
 //////////////////////////////////////////////////////////////////////////////////////////// FOR SELLERS
 protected void ddSalesPpl_SelectedIndexChanged(object sender, EventArgs e)
 {
     GoDine a = new GoDine();
     if (!(ddSalesPpl.SelectedValue.Contains("---sellers---")))
     {
         Guid UserID = a.UserName_2_Guid(ddSalesPpl.SelectedValue);
         Guid SellerID = a.getSellerFromUser(UserID).SellerID;
         SellerStats seller = a.SellerSts(SellerID);
         decimal paid = a.getPaidToSeller(SellerID);
         lblPaidSalesAmount.Text = "Amount left to pay for this seller = " + (seller.owed - paid).ToString("0.00");
     }
     else
     {
         tbPaidAmount.Text = "";
     }
 }
예제 #2
0
 /////////////////////////////////////////////////////////////////////////// FOR SELLER DEAL RATE
 protected void ddSalesDealRate_SelectedIndexChanged(object sender, EventArgs e)
 {
     DataClassesAlbertDataContext db = new DataClassesAlbertDataContext();
     string Seller = ddSalesDealRate.Text;
     GoDine a = new GoDine();
     if (!(ddSalesDealRate.SelectedValue.Contains("---sellers---")))
     {
         Guid UserID = a.UserName_2_Guid(ddSalesDealRate.SelectedValue);
         Guid SellerID = a.getSellerFromUser(UserID).SellerID;
         decimal rate = a.getDealRateForSellerID(SellerID);
         tbSalesDealRate.Text = rate.ToString("0.00");
     }
     else
     {
         tbSalesDealRate.Text = "";
     }
 }