当前位置: 首页>>代码示例>>C#>>正文


C# RequestFields类代码示例

本文整理汇总了C#中RequestFields的典型用法代码示例。如果您正苦于以下问题:C# RequestFields类的具体用法?C# RequestFields怎么用?C# RequestFields使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


RequestFields类属于命名空间,在下文中一共展示了RequestFields类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: clockOutEmployee

 /// <summary>
 /// Clock out a single employee using timeclock.clockout
 /// </summary>
 /// <param name="id">ShiftPlanning ID of the employee to clock out</param>
 /// <returns>API response data for timeclock.clockout</returns>
 public APIResponse clockOutEmployee(int id)
 {
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "timeclock.clockout");
     requestFields.Add("method", "GET");
     requestFields.Add("employee", id);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:skipatrol,项目名称:cs-sdk,代码行数:14,代码来源:ShiftPlanning.cs

示例2: createAdminBackup

 public APIResponse createAdminBackup(RequestFields details)
 {
     // create new admin file
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "admin.backup");
     requestFields.Add("method", "CREATE");
     //append details
     foreach (KeyValuePair<string, object> fld in details)
         requestFields.Add(fld.Key, fld.Value);
     //append filedetails
     RequestFields file_details = getFileData(details["filename"].ToString());
     foreach (KeyValuePair<string, object> fld in file_details)
         requestFields.Add(fld.Key, fld.Value);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:16,代码来源:ShiftPlanning.cs

示例3: getStaffSkills

 public APIResponse getStaffSkills()
 {
     // get a list of staff skills
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "staff.skills");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:9,代码来源:ShiftPlanning.cs

示例4: deleteVacationSchedule

 public APIResponse deleteVacationSchedule(int id)
 {
     // delete a VacationSchedule by id
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "schedule.vacation");
     requestFields.Add("method", "DELETE");
     requestFields.Add("id", id);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:10,代码来源:ShiftPlanning.cs

示例5: getStaffSkillDetails

 public APIResponse getStaffSkillDetails(int id)
 {
     // get skill detail by id
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "staff.skill");
     requestFields.Add("method", "GET");
     requestFields.Add("id", id);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:10,代码来源:ShiftPlanning.cs

示例6: updateVacationSchedule

    public APIResponse updateVacationSchedule(RequestFields vacation_details)
    {
        // update VacationSchedule
        RequestFields requestFields = new RequestFields();
        requestFields.Add("module", "schedule.vacation");
        requestFields.Add("method", "UPDATE");
        //append fields
        foreach (KeyValuePair<string, object> fld in vacation_details)
            requestFields.Add(fld.Key, fld.Value);

        this.setRequest(requestFields);
        return response;
    }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:13,代码来源:ShiftPlanning.cs

示例7: getFileData

    private RequestFields getFileData(string filename)
    {
        // get file details, (data, length, mimetype)
        try
        {
            RequestFields file_data = new RequestFields();
            if (File.Exists(filename))
            {// file found
                byte[] file_content = File.ReadAllBytes(filename);
                file_data.Add("filepath", filename);
                file_data.Add("filelength", file_content.Length);
                string extension = filename.Substring(filename.LastIndexOf(".") + 1);
                file_data.Add("mimetype", getFileMimeType(extension));

                return file_data;
            }
            else
            {// file not found
                throw new Exception(this.internal_errors(8));
            }
        }
        catch (Exception e)
        {// any error
            throw e;
        }
    }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:26,代码来源:ShiftPlanning.cs

示例8: getWallMessages

 public APIResponse getWallMessages()
 {
     // get messages for the currently logged in user
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "messaging.wall");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:9,代码来源:ShiftPlanning.cs

示例9: doLogin

 /*
  * User Authentication Methods
  *
  */
 public APIResponse doLogin(RequestFields login_details)
 {
     // perform a login api call
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "staff.login");
     requestFields.Add("method", "GET");
     //append message fields
     foreach (KeyValuePair<string, object> fld in login_details)
         requestFields.Add(fld.Key, fld.Value);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:16,代码来源:ShiftPlanning.cs

示例10: getEmployeeDetails

 public APIResponse getEmployeeDetails(int id)
 {
     // get employee details by id
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "staff.employee");
     requestFields.Add("method", "GET");
     requestFields.Add("id", id);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:10,代码来源:ShiftPlanning.cs

示例11: getEmployees

 /*
  * Staff Methods
  *
  */
 public APIResponse getEmployees()
 {
     // get a list of employees
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "staff.employees");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:13,代码来源:ShiftPlanning.cs

示例12: getAPIConfig

 /*
  * API Methods
  *
  */
 public APIResponse getAPIConfig()
 {
     // get API config
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "api.config");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:13,代码来源:ShiftPlanning.cs

示例13: getAPIMethods

 public APIResponse getAPIMethods()
 {
     // get API methods
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "api.methods");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:9,代码来源:ShiftPlanning.cs

示例14: getAdminSettings

 public APIResponse getAdminSettings()
 {
     // get admin settings
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "admin.settings");
     requestFields.Add("method", "GET");
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:9,代码来源:ShiftPlanning.cs

示例15: getAdminFileDetails

 public APIResponse getAdminFileDetails(int id)
 {
     // get admin file details
     RequestFields requestFields = new RequestFields();
     requestFields.Add("module", "admin.file");
     requestFields.Add("method", "GET");
     requestFields.Add("id", id);
     this.setRequest(requestFields);
     return response;
 }
开发者ID:steewsc,项目名称:cs-sdk,代码行数:10,代码来源:ShiftPlanning.cs


注:本文中的RequestFields类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。