Пример #1
0
        private string[] editTaskInfo(string taskCode)
        {
            string debugstring = DHandling.NumberOfCharacters(taskCode, 1);

            string[]  retval = new string[2];
            string    sqlStr = "T.TaskName, P.PartnerName FROM D_Task AS T LEFT JOIN M_Partners AS P ON T.PartnerCode = P.PartnerCode WHERE T.TaskBaseCode = '" + DHandling.NumberOfCharacters(taskCode, 1) + "'";
            DbAccess  dba    = new DbAccess();
            DataTable dt     = dba.UsingSqlstring_Select(sqlStr);

            if (dt == null || dt.Rows.Count < 1)
            {
                retval[0] = "(" + taskCode + ")";
                retval[1] = "";
            }
            else
            {
                DataRow dr = dt.Rows[0];
                retval[0] = "(" + taskCode + ")" + Convert.ToString(dr["TaskName"]);
                retval[1] = Convert.ToString(dr["PartnerName"]);
            }
            return(retval);
        }