All pastes #914434 Raw Edit

Someone

public text v1 · immutable
·published 2008-02-22 21:51 UTC
rendered paste body
	public static void Get_CheckOut_Items ( string CompNo , string PriceLevel , string CompCurrency , string SysRounding , SortedList<string , int> CartList )
		{
			m_Cart_SubTotal=0.00m; string sColor="#F1F1F1"; // int ICount=1;
			ph=new PlaceHolder ( );
			ph.ID="PHCartDetails";
			foreach ( KeyValuePair<string , int> dr in CartList )
			{
				if ( sColor=="#F1F1F1" )
					sColor="#F9F9F9";
				else
					sColor="#F1F1F1";
				string ProdID=dr.Key; string strWhere="CompanyID = "+"'"+CompNo+"'"+" ) AND ( "+"ProductID  = "+"'"+ProdID+"'";

				c_TLK.Table1To8 ( 8 , "Product" , strWhere , "CompanyID,ProductID" , "iPicture, iDescription, iCalcCost, RetailMarkup, DealerMarkup, DistributeMarkup, iPromoEnd, iRebateDollars" );
				decimal iSell=dec_F_str_2 ( c_TLK.Get_Product_Prices ( CompNo , PriceLevel , c_TLK.Get_4 , c_TLK.Get_5 , c_TLK.Get_6 , CompCurrency , SysRounding , c_TLK.Get_3 , "0.00" , "0.00" , c_TLK.Get_7 , c_TLK.Get_8 ) );

				tb1=new Table ( );
				tb1.ID="TableHead"+ProdID;
				tb1.Width=Unit.Percentage ( 100 );
				tb1.CellPadding=0;
				tb1.CellSpacing=0;
				tb1.CssClass="style1";

				row1=new TableRow ( );
				row1.ID="TR"+m_iRowCount++;
				
				tb1.Rows.Add ( row1 );


				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackCLeftBorder";
				cell1.ID="TC"+m_iRowCount++;
				cell1.Width=Unit.Percentage ( 5 );
				cell1.Text=ProdID;
				cell1.BackColor=ColorHex_To_RGB ( sColor );
				row1.Cells.Add ( cell1 );

				System.Web.UI.WebControls.Image Img1=new System.Web.UI.WebControls.Image ( );
				Img1.ID="Img"+ProdID;
				Img1.Height=Unit.Pixel ( 50 );
				Img1.Width=Unit.Pixel ( 50 );
				Img1.AlternateText="Image";
				if ( c_TLK.Get_1=="" )
					Img1.ImageUrl="~/ImgProduct/"+"00NotFound.JPG";
				else
					Img1.ImageUrl="~/ImgProduct/"+c_TLK.Get_1;		

				cell1.Controls.Add ( Img1 );

				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackC";
				cell1.ID="TC"+m_iRowCount++;
				cell1.Width=Unit.Percentage ( 10 );
				cell1.Text=ProdID;
				cell1.BackColor=ColorHex_To_RGB ( sColor );
				row1.Cells.Add ( cell1 );

				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackC";
				cell1.ID="TC"+m_iRowCount++;
				cell1.Width=Unit.Percentage ( 5 );
				cell1.Text=dr.Value.ToString ( );
				cell1.BackColor=ColorHex_To_RGB ( sColor );
				row1.Cells.Add ( cell1 );

				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackL";
				cell1.ID="TC"+m_iRowCount++;
				//cell1.Width=Unit.Percentage ( 10 );
				cell1.Text=c_TLK.Get_2; 
				cell1.BackColor=ColorHex_To_RGB ( sColor );
				row1.Cells.Add ( cell1 );


				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackPriceRPad";
				cell1.ID="CPrice"+ProdID;
				cell1.Width=Unit.Percentage ( 10 );
				//cell1.Text=iSell.ToString ( )+"Price"+ProdID;
				cell1.BackColor=ColorHex_To_RGB ( sColor );
			
				Label lx1=new Label ( );
				lx1.ID="Price"+ProdID;
				lx1.Width=Unit.Percentage ( 100 );
				lx1.CssClass="TextBlackPaddingR";
				lx1.Text=iSell.ToString ( )+"Price"+ProdID;

				cell1.Controls.Add ( lx1 );
				row1.Cells.Add ( cell1 );

				cell1=new TableCell ( );
				cell1.CssClass="InvoiceTextBlackPriceRRightBorderblG";
				cell1.ID="CExtended"+ProdID;
				cell1.Width=Unit.Percentage ( 10 );
				//cell1.Text=Convert.ToString ( ( dr.Value*iSell ) )+"Extended"+ProdID;
				cell1.BackColor=ColorHex_To_RGB ( sColor );
			
				lx1=new Label ( );
				lx1.ID="Extended"+ProdID;
				lx1.Width=Unit.Percentage ( 100 );
				lx1.CssClass="TextBlackPaddingR";
				lx1.Text=Convert.ToString ( ( dr.Value*iSell ) )+"Extended"+ProdID;

				cell1.Controls.Add ( lx1 );
				row1.Cells.Add ( cell1 );

				m_Cart_SubTotal+=( dr.Value*iSell );

				ph.Controls.Add ( tb1 );
			}
			_Cart_SubTotal=m_Cart_SubTotal;
		 //	return tb1;
		}