예제 #1
0
        public ContentResult Action(string course_name)
        {
            Dictionary <string, string> paramsMap = new Dictionary <string, string>();

            paramsMap.Add("@course", course_name);
            DataTable dtData = _appLoader.ExecuteSelectWithConditionsReturnDT(AppMain.Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, AppMain.Global.MapStoreProcedures.ikcoder_appmain.spa_operation_course_exp, paramsMap);

            return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
        }
예제 #2
0
        public ContentResult Action()
        {
            Dictionary <string, string> paramsmap = new Dictionary <string, string>();
            string uname = GetAccountInfoFromBasicController("name");

            paramsmap.Add("@uid", uname);
            DataTable dtData = _appLoader.ExecuteSelectWithConditionsReturnDT(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_students_lessonfinished, paramsmap);

            return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
        }
 public ContentResult Action()
 {
     try
     {
         DataTable dtData = _appLoader.ExecuteSelect(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_course_main);
         return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
     }
     catch
     {
         return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Fetch_Error], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Fetch_Error])));
     }
 }
예제 #4
0
 public string Action_Get_RelationsAcceptableList(string token, AppLoader existedLoader)
 {
     try
     {
         Global.ItemAccountStudents activeItem = Global.LoginServices.Pull(token);
         string    sql    = "select * from relations_students where suname='" + activeItem.name + "' and isacc='0'";
         DataTable dtData = existedLoader.ExecuteSQL(Global.GlobalDefines.DB_KEY_IKCODER_BASIC, sql);
         return(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData));
     }
     catch (Exception err)
     {
         return(err.Message + "|" + err.StackTrace);
     }
 }
 public ContentResult Action(string course_name)
 {
     try
     {
         Dictionary <string, string> paramsForBasic = new Dictionary <string, string>();
         paramsForBasic.Add("@course_name", course_name);
         List <string> lstCourses = new List <string>();
         DataTable     dtData     = _appLoader.ExecuteSelectWithConditionsReturnDT(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_course_basic, paramsForBasic);
         return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
     }
     catch
     {
         return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Fetch_Error], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Fetch_Error])));
     }
 }
예제 #6
0
 public ContentResult Action()
 {
     try
     {
         string uname = GetAccountInfoFromBasicController("name");
         Dictionary <string, string> paramsForBasic = new Dictionary <string, string>();
         paramsForBasic.Add("@uid", uname);
         paramsForBasic.Add("@date", DateTime.Now.ToString("yyyy-MM-dd"));
         DataTable dtData = _appLoader.ExecuteSelectWithMixedConditionsReturnDT(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_students_mood, paramsForBasic);
         return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
     }
     catch
     {
         return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Fetch_Error], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Fetch_Error])));
     }
 }
        public ContentResult Action()
        {
            try
            {
                string      accoutInfo     = RequestForString("Account_Students_GetCurrentAccountInfo", true);
                XmlDocument accountInfoDoc = new XmlDocument();
                accountInfoDoc.LoadXml(accoutInfo);
                XmlNode rootNode = accountInfoDoc.SelectSingleNode("/root");
                if (rootNode != null)
                {
                    string id = Util_XmlOperHelper.GetAttrValue(rootNode, "id");
                    Dictionary <string, string> lstParams = new Dictionary <string, string>();
                    lstParams.Add("uid", id);
                    DataTable dtExp = _appLoader.ExecuteSelectWithMixedConditionsReturnDT(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_students_exp, lstParams);
                    if (dtExp != null && dtExp.Rows.Count > 0)
                    {
                        DataRow currentRow = null;
                        Data_dbDataHelper.GetActiveRow(dtExp, 0, out currentRow);
                        string strExp = string.Empty;
                        Data_dbDataHelper.GetColumnData(currentRow, "exp", out strExp);
                        int currentExp = 0;
                        int.TryParse(strExp, out currentExp);
                        DataTable dtData = _appLoader.ExecuteSelect(Global.GlobalDefines.DB_KEY_IKCODER_APPMAIN, Global.MapStoreProcedures.ikcoder_appmain.spa_operation_titles_defined);
                        //foreach(DataRow )


                        return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dtData)));
                    }
                    else
                    {
                        return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Fetch_Error], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Fetch_Error])));
                    }
                }
                else
                {
                    return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Login_Needed], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Login_Needed])));
                }
            }
            catch
            {
                return(Content(MessageHelper.ExecuteFalse(Global.MsgMap.MsgCodeMap[Global.MsgKeyMap.MsgKey_Fetch_Error], Global.MsgMap.MsgContentMap[Global.MsgKeyMap.MsgKey_Fetch_Error])));
            }
        }
예제 #8
0
        public ContentResult actionResult()
        {
            DataTable dataTable = _appLoader.ExecuteSQL(Global.GlobalDefines.DB_KEY_IKCODER_BASIC, "select count(*) as total from account_students");

            return(Content(Data_dbDataHelper.ActionConvertDTtoXMLString(dataTable)));
        }