private void BindMaxNo(Int32 FromCityIdno, Int32 YearId) { ChlnBookingCrsngDAL obj = new ChlnBookingCrsngDAL(); Int64 MaxNo = obj.MaxNo(YearId, FromCityIdno, ApplicationFunction.ConnectionString()); txtchallanNo.Text = Convert.ToString(MaxNo); }
protected void DdlfromcityHead_SelectedIndexChanged(object sender, EventArgs e) { try { ChlnBookingCrsngDAL objGR = new ChlnBookingCrsngDAL(); Int64 MaxCRNo = 0; MaxCRNo = objGR.MaxNo(Convert.ToInt32(ddldateRange.SelectedValue), Convert.ToInt32(Convert.ToString(DdlfromcityHead.SelectedValue) == "" ? 0 : Convert.ToInt32(DdlfromcityHead.SelectedValue)), ApplicationFunction.ConnectionString()); txtchallanNo.Text = Convert.ToString(MaxCRNo); DdlfromcityHead.Focus(); txtchallanNo.SelectText(); return; } catch (Exception Ex) { } }