Beispiel #1
0
        private DataTable Questiondata(string Category, string FarmerID, int year)
        {
            DataTable dtTempp = new DataTable();

            DataRow[] drRow = Farmer_DL.GetCheckpointQuestions(FarmerID).Select("Qcategory='" + Category + "' and Year='" + year + "'");
            if (drRow.Length > 0)
            {
                dtTempp = Farmer_DL.GetCheckpointQuestions(FarmerID).Clone();
                foreach (DataRow pdr in drRow)
                {
                    DataRow newdr = dtTempp.NewRow();
                    for (int count = 0; count < pdr.ItemArray.Length; count++)
                    {
                        newdr[count] = pdr[count];
                    }
                    dtTempp.Rows.Add(newdr);
                }
            }
            return(dtTempp);
        }
Beispiel #2
0
 //Code by ravi to get Questions
 public DataTable GetYearFarmer(string FarmerID)
 {
     return(Farmer_DL.GetCheckpointQuestions(FarmerID).DefaultView.ToTable(true, "Year"));
 }