日期:2014-05-17 浏览次数:20620 次
string pc_select=Pc_Select.SelectedItem.Text.ToString();
string price=Price.Text.ToString().Trim();
string numbers=Numbers.Text.ToString().Trim();
string company_select=Company_Select.SelectedItem.Text.ToString().Trim();
//string selltimes=SellTimes.Text.ToString().Trim();
//string discount=Discount.Text.ToString().Trim();
string prices = Price.Text.ToString().Trim();
//string deduct=Deduct.Text.ToString().Trim();
//string pricedifference=PriceDifference.Text.ToString().Trim();
string text=Texts.Text.ToString().Trim();
bool ADD;
if((price=="") ||(!GetDB.IsNum(price))){this.RegisterStartupScript("a1","<script language=javascript>alert('单价不能为空或者格式不正确!');document.all('Price').focus();<"+"/"+"script>");ADD=false;}
else if((numbers=="")||(!GetDB.IsNum(numbers))){this.RegisterStartupScript("b1","<script language=javascript>alert('数量不能为空或者格式不正确!');document.all('Numbers').focus();<"+"/"+"script>");ADD=false;}
else if(company_select==""){this.RegisterStartupScript("c1","<script language=javascript>alert('请添写客户名称!');document.all('Company_Select').focus();<"+"/"+"script>");ADD=false;}
//else if(selltimes==""){this.RegisterStartupScript("f1","<script language=javascript>alert('请选择购机时间!');document.all('SellTimes').focus();<"+"/"+"script>");ADD=false;}
//else if((discount=="") ||(!GetDB.IsNum(discount))){this.RegisterStartupScript("h1","<script language=javascript>alert('时尚扣点不能为空或者格式不正确!');document.all('Discount').focus();<"+"/"+"script>");ADD=false;}
//else if ((prices == "") || (!GetDB.IsNum(prices))) { this.RegisterStartupScript("i1", "<script language=javascript>alert('供价不能为空或者格式不正确!');document.all('Prices').focus();<" + "/" + "script>"); ADD = false; }
//else if((deduct=="") ||(!GetDB.IsNum(deduct))){this.RegisterStartupScript("j2","<script language=javascript>alert('提成不能为空或者格式不正确!');document.all('Deduct').focus();<"+"/"+"script>");ADD=false;}
else ADD=true;
//if(pricedifference=="") pricedifference="0";
//else if(!GetDB.IsNum(pricedifference)) {this.RegisterStartupScript("j3","<script language=javascript>alert('补差格式不正确!');document.all('Deduct').focus();<"+"/"+"script>