/* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - End */ /// <summary> /// To display Tablular list data /// </summary> /// public void DisplayTableData() { try { //Create the Mobile Presenter objMobPresenter = new MobilePresenter(); DataSet ds = new DataSet(); //Call the Mobile Presenter ds = objMobPresenter.GetTableData(alIocnList, Node, Name); /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - Begin */ /* 2.2 If we add a new series in service configuration under mobile section e.g. relative humidity, it should be displayed on mobile. */ dtSeries = ds.Tables[0]; /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - End */ dtByDays = ds.Tables[1]; /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - Begin */ /* 2.2 If we add a new series in service configuration under mobile section e.g. relative humidity, it should be displayed on mobile. */ // commented for CR //changeColNames(dtByDays); /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - End */ modifyData(dtByDays); if (dtByDays.Rows.Count > 0) { dFirstDate = DateTime.Parse(dtByDays.Rows[0][DATE].ToString()); } DataTable dtFiltered; if (Filter) { dtFiltered = dtByDays.Select("" + DATE + "='" + dFirstDate.AddDays(1) + "' or " + DATE + "='" + dFirstDate.AddDays(2) + "'").CopyToDataTable(); } else { dtFiltered = dtByDays; } if (dtFiltered.Rows.Count > 0) { Repeater1.DataSource = dtFiltered; Repeater1.DataBind(); } /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - Begin */ /* 2.2 If we add a new series in service configuration under mobile section e.g. relative humidity, it should be displayed on mobile. */ // commented for CR //DataTable dtSeries = ds.Tables[0]; //foreach (DataRow dr in dtSeries.Rows) //{ // if (dr["trnsTag"].ToString().ToLower().Contains("temp")) // { // if (dr["trnsTag"].ToString().ToLower().Contains("max")) // Max = getTranslatedText(dr["trnsTag"].ToString()); // else // Min = getTranslatedText(dr["trnsTag"].ToString()); // } // if (dr["trnsTag"].ToString().Contains("_wind_")) // Wind = getTranslatedText(dr["trnsTag"].ToString()); // if (dr["trnsTag"].ToString().Contains(TRNSTAG_RAIN)) // Rain = getTranslatedText(dr["trnsTag"].ToString()); //} /* Agricast CR - R2 - Mobile site-Login Page and service configuration changes - End */ } catch (Exception ex) { objSvcPre = new ServicePresenter(); AgriCastException currEx = new AgriCastException(objSvcPre.GetServiceDetails(), ex); AgriCastLogger.Publish(currEx, AgriCastLogger.LogType.Error); HttpContext.Current.Session["ErrorMessage"] = objCommonUtil.getTransText(Constants.MOB_DISPLAYTABLE_ERROR) + " : " + ex.Message.ToString(); } }
protected void Page_Init(object sender, EventArgs e) { //Initialize the objects objComm = new CommonUtil(); objServiceHandler = new ServiceHandler(); objMobPresenter = new MobilePresenter(); svcInfo = new ServiceInfo(); svcInfo = ServiceInfo.ServiceConfig; }