>string strOrderNo = this.txtOrderNo.Text; > int? OrderNo; > if (strOrderNo.Equals(String.Empty)) > OrderNo = null; > else > OrderNo = Convert.ToInt32(strOrderNo); > > _dtOrder = biz.Find(OrderNo, this.dtgStartDate.Value, this.dtgEndDate.Value);>
int? orderNo = null; if (!string.IsNullOrEmpty(strOrderNo)) orderNo = Convert.ToInt32(strOrderNo); dtOrder = biz.Find(orderNo, this.dtgStartDate.Value, this.dtgEndDate.Value);