Example #1
0
        public IGrid FindRecord(Model.Table.User u, IParameter <Model.Table.Record> param)
        {
            IGrid     g  = param.GetGrid();
            UP_Simple up = new UP_Simple("UP_SelectRecord");

            up.InputParams.Add("begin", param.begin + 1);
            up.InputParams.Add("end", param.begin + param.count);
            up.InputParams.Add("ext", param.GetNullString("reclis_ext"));
            up.InputParams.Add("caller", param.GetNullString("reclis_calling"));
            up.InputParams.Add("called", param.GetNullString("reclis_called"));
            up.InputParams.Add("max", param.GetInt("reclis_starttime"));
            up.InputParams.Add("min", param.GetInt("reclis_starttime"));
            switch (param.GetInt("reclis_calltype"))
            {
            case 1:
                up.InputParams.Add("type", 0); break;

            case 2:
                up.InputParams.Add("type", 3); break;
            }
            up.InputParams.Add("beginDate", param.GetNullString("reclis_starttime"));
            up.InputParams.Add("endDate", param.GetNullString("reclis_endtime"));
            up.InputParams.Add("agentid", param.GetNullString("reclis_agentid"));
            // up.InputParams.Add("serverfalg", param.begin + 1);
            //up.InputParams.Add("checked", param.GetInt("checkState"));
            g.SwitchData          = new RecordSwitchData(this);
            g.SwitchData.@checked = param.GetBool("checkState") ?? false;
            g.ExecProc(up);
            return(g);
        }
Example #2
0
        public bool Delete(int id)
        {
            UP_Simple up = new UP_Simple("UP_DeleteUser");

            up.InputParams.Add("id", id);
            using (Sbw.DbClinet.DbClinet Client = new Sbw.DbClinet.DbClinet())
            {
                return(Client.ExecuteNonQuery(up) > 0);
            }
        }
Example #3
0
        public Model.Frame.IGrid GetReport(string procName, DateTime?date, int?type)
        {
            Model.Frame.IGrid g  = new Grid();
            UP_Simple         up = new UP_Simple(procName);

            up.type = 1;
            up.InputParams.Add("datetime", date);
            up.InputParams.Add("type", type);
            g.ExecProc(up);
            return(g);
        }
Example #4
0
        public Model.Frame.IGrid GetReport(string procName, DateTime?begin, DateTime?end, int?type)
        {
            Model.Frame.IGrid g  = new Grid();
            UP_Simple         up = new UP_Simple(procName);

            up.type = 1;
            up.InputParams.Add("begin", begin);
            up.InputParams.Add("end", end);
            up.InputParams.Add("type", type);
            g.ExecProc(up);
            return(g);
        }
Example #5
0
        public int EditUserRecordPermission(string userId, string exts, string agents)
        {
            UP_Simple up = new UP_Simple("UP_RecordPermission");

            up.InputParams.Add("userId", userId);
            up.InputParams.Add("exts", exts);
            up.InputParams.Add("agents", agents);
            using (Sbw.DbClinet.DbClinet Client = new Sbw.DbClinet.DbClinet())
            {
                return(Client.ExecuteNonQuery(up));
            }
        }