コード例 #1
0
        /// <summary>
        /// 删除表单数据
        /// </summary>
        /// <param name="_"></param>
        /// <returns></returns>
        private Response DeleteForm(dynamic _)
        {
            FormParam req = this.GetReqData <FormParam>();// 获取模板请求数据

            formSchemeIBLL.DeleteInstanceForm(req.schemeInfoId, req.keyValue);
            return(Success("删除成功"));
        }
コード例 #2
0
ファイル: FormMain.cs プロジェクト: androidZ200/Graphics
 private void comboBox1_SelectionChangeCommitted(object sender, EventArgs e)
 {
     if (comboBox1.SelectedIndex == 0)
     {
         FunctionWithParameters <double> f = new FunctionWithParameters <double>(new NaN <double>());
         lock (drawinglock)
             functions.Add(f, "");
         FormFunc form = new FormFunc(new KeyValuePair <FunctionWithParameters <double>, string>(f, ""), builder, this);
         form.Show();
     }
     else if (comboBox1.SelectedIndex < functions.Count + 1)
     {
         var enumer = functions.GetEnumerator();
         for (int i = 0; i < comboBox1.SelectedIndex; i++)
         {
             enumer.MoveNext();
         }
         FormFunc form = new FormFunc(enumer.Current, builder, this);
         form.Show();
     }
     else
     {
         int       i    = comboBox1.SelectedIndex - functions.Count - 1;
         FormParam form = new FormParam(this, parametrs.ElementAt(i));
         form.Show();
     }
 }
コード例 #3
0
 internal void SetNode()
 {
     SyncStatic.TryCatch(() =>
     {
         if (NodePath.IsNullOrEmpty())
         {
             throw new Exception("请求地址不能为空!");
         }
         URI = new Uri(NodePath);
         if (!JsonParam.IsNullOrEmpty() && ReqType != MultiType.DELETE && ReqType != MultiType.GET)
         {
             Contents = new StringContent(JsonParam);
             Contents.Headers.ContentType = new MediaTypeHeaderValue("application/json");
         }
         if (!JsonParam.IsNullOrEmpty() && (ReqType == MultiType.DELETE || ReqType == MultiType.GET))
         {
             URI = new Uri(NodePath + JsonParam.ToModel <JObject>().ByUri());
         }
         if (FormParam != null && FormParam != null && FormParam.Count > 0 && ReqType != MultiType.DELETE && ReqType != MultiType.GET)
         {
             Contents = new FormUrlEncodedContent(FormParam);
             Contents.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
         }
         if (FormParam != null && FormParam != null && FormParam.Count > 0 && (ReqType == MultiType.DELETE || ReqType == MultiType.GET))
         {
             URI = new Uri(NodePath + FormParam.ByUri());
         }
         if (EntityParam != null && ReqType != MultiType.DELETE && ReqType != MultiType.GET)
         {
             Contents = new FormUrlEncodedContent(MultiKeyPairs.KeyValuePairs(EntityParam, MapFied));
             Contents.Headers.ContentType = new MediaTypeHeaderValue("application/x-www-form-urlencoded");
         }
         if (EntityParam != null && (ReqType == MultiType.DELETE || ReqType == MultiType.GET))
         {
             URI = new Uri(NodePath + EntityParam.ByUri());
         }
         MultiConfig.NodeOpt.Add(this);
     }, ex => throw ex);
 }