示例#1
0
 //**********************************************************
 //* Добавление новой задачи
 //**********************************************************
 public static void AddTask(Int32 researchId, Int32 taskType, String value)
 {
     using (SandBoxDataContext db = new SandBoxDataContext())
     {
         Task task = new Task { ResearchId = researchId, Type = taskType, Value = value };
         db.Tasks.InsertOnSubmit(task);
         db.SubmitChanges();
     }
 }
示例#2
0
        private string GetConvertedTask(Task rschToCompareTask)
        {
            string res = string.Empty;
            if ((rschToCompareTask == null) || (rschToCompareTask.Value == null) || (rschToCompareTask.Value == String.Empty))
            {
                return String.Empty;
            }
            else
            {
                int numberRoot;
                bool result = Int32.TryParse(rschToCompareTask.Value.Substring(0, 1), out numberRoot);
                if(result)
                {
                    if(RootElementsCodes.Keys.Contains(numberRoot))
                    {
                        res = RootElementsCodes[numberRoot];
                        if (rschToCompareTask.Value.Length == 1) return res;
                        res+=("\\"+ rschToCompareTask.Value.Substring(1, (rschToCompareTask.Value.Length-1)));
                        return res;
                    }
                    else return rschToCompareTask.Value;

                }
                return rschToCompareTask.Value;

            }
        }
示例#3
0
 partial void UpdateTask(Task instance);
示例#4
0
 partial void DeleteTask(Task instance);
示例#5
0
 partial void InsertTask(Task instance);