예제 #1
0
        ///<summary>Appends the passed in rawBase64 string to the RawBase64 column in the db for the UpdateFiles DocMiscType row.</summary>
        public static void AppendRawBase64ForUpdateFiles(string rawBase64)
        {
            if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)
            {
                Meth.GetVoid(MethodBase.GetCurrentMethod(), rawBase64);
                return;
            }
            string command = "UPDATE documentmisc SET RawBase64=CONCAT(" + DbHelper.IfNull("RawBase64", "") + "," + DbHelper.ParamChar + "paramRawBase64) "
                             + "WHERE DocMiscType=" + POut.Int((int)DocumentMiscType.UpdateFiles);
            OdSqlParameter paramRawBase64 = new OdSqlParameter("paramRawBase64", OdDbType.Text, rawBase64);

            Db.NonQ(command, paramRawBase64);
        }
예제 #2
0
파일: Schedules.cs 프로젝트: nampn/ODental
        ///<summary>This is only allowed because it's PRIVATE.</summary>
        private static List <Schedule> RefreshAndFill(string command)
        {
            //Not a typical refreshandfill, as it contains a query.
            //The GROUP_CONCAT() function returns a comma separated list of items.
            //In this case, the ops column is filled with a comma separated list of
            //operatories for the corresponding schedule record.
            command = "SELECT s.*,"
                      + DbHelper.IfNull(DbHelper.CastToChar("(SELECT " + DbHelper.GroupConcat("so.OperatoryNum") +
                                                            "FROM scheduleop so " +
                                                            "WHERE so.ScheduleNum=s.ScheduleNum " +
                                                            "GROUP BY so.ScheduleNum)"), "") + " ops " +
                      "FROM (" + command + ") s";
            DataTable table = Db.GetTable(command);

            return(ConvertTableToList(table));
        }