Ejemplo n.º 1
0
 public void AddIncludeDeadline(Action_Detail objActionDetail, string deadline)
 {
     if (!string.IsNullOrEmpty(deadline))
     {
         string query = "UPDATE `actions` SET `DeadLine` = '" + deadline + "' WHERE `ActionsID` = '" + objActionDetail.ActionsID + "'";
         Program.destopService.DataExecute(Program.Username, Program.Password, query, ref errorString);
         if (string.IsNullOrEmpty(errorString))
         {
             Add(objActionDetail);
         }
     }
     else
     {
         Add(objActionDetail);
     }
 }
Ejemplo n.º 2
0
        public void Edit(Action_Detail obj)
        {
            string queryStr = "UPDATE `action_detail` SET";

            queryStr += string.Format(" ActionID = '{0}'", obj.ActionsID);
            queryStr += string.Format(" ,Content = '{0}'", obj.Content);

            queryStr += string.Format(" ,Status = '{0}'", obj.Status);

            queryStr += string.Format(" ,PIC = '{0}'", obj.PIC);

            queryStr += string.Format(" ,Priority = '{0}'", obj.Priority);
            queryStr += string.Format(" WHERE id = '{0}'", obj.id);

            Program.destopService.DataExecute(Program.Username, Program.Password, queryStr, ref errorString);
        }
Ejemplo n.º 3
0
        public void Add(Action_Detail obj)
        {
            string queryStr = "INSERT INTO";

            queryStr += " `action_detail` (`ActionID`, `Content`, `PIC`, `Status`, `Priority`, `CreatorID`, `CreatedDate`)";
            queryStr += " VALUES(";
            queryStr += string.Format("'{0}'", obj.ActionsID);
            queryStr += string.Format(", '{0}'", obj.Content);
            queryStr += string.Format(", '{0}'", obj.PIC.EmployeeId);
            queryStr += string.Format(", '{0}'", obj.Status.ActionStatusID);
            queryStr += string.Format(", '{0}'", obj.Priority.PriorityID);

            queryStr += string.Format(", '{0}'", Program.employee1.EmployeeId);
            queryStr += string.Format(", {0})", "NOW()");

            Program.destopService.DataExecute(Program.Username, Program.Password, queryStr, ref errorString);
            //MessageBox.Show(id + "");
        }