Пример #1
0
        public static string SetTrainerForTraining(string action, string id, string trainer_id, string training_id)
        {
            string result = null;

            wcf.parti.Service1 _parti   = new wcf.parti.Service1();
            string             json_str = _parti.EditTrainerForTrainings(action, id, trainer_id, training_id);

            if (json_str == "e0")//code error
            {
                result = "e0:ລະບົບຂັດຂ້ອງຕິດຕໍ່ຜູ້ເບີ່ງແຍ່ງດ່ວນ.";
            }
            else if (json_str == "e1")//no data found
            {
                result = "e1:ບໍ່ມີຂໍ້ມູນທີ່ຈະສະແດງ.";
            }
            else if (json_str == "e2")//can't connect databbase
            {
                result = "e2:ບໍ່ສາມາດເຊື່ອມຕໍ່ຖານຂໍ້ມູນໄດ້.";
            }
            else if (json_str == "e5")
            {
                result = "e5:ຈັດການຂໍ້ມູນສຳເລັດ.";
            }

            return(result);
        }