private string getStateName(string old) { try { if (old != "") { Attendance.BAL.Business obj = new Attendance.BAL.Business(); DataTable ds = obj.GetState(); DataTable dt = new DataTable(); DataView dv = ds.DefaultView; dv.RowFilter = "StateID=" + Convert.ToInt32(old); dt = dv.ToTable(); old = dt.Rows[0]["StateName"].ToString(); } } catch (Exception ex) { } return(old); }
private string getStateName(string old) { try { if (old != "") { Attendance.BAL.Business obj = new Attendance.BAL.Business(); DataTable ds = obj.GetState(); DataTable dt = new DataTable(); DataView dv = ds.DefaultView; dv.RowFilter = "StateID=" + Convert.ToInt32(old); dt = dv.ToTable(); old = dt.Rows[0]["StateName"].ToString(); } } catch (Exception ex) { } return old; }