示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string httpMethod = Request.HttpMethod;
                string buildId    = ConvertUtility.Trim(Request.QueryString["id"]);

                if (httpMethod.Equals("get", StringComparison.OrdinalIgnoreCase))
                {
                    BuildCtService buildService = new BuildCtService();
                    this.model = buildService.GetBuild(buildId);
                }
                else
                {
                    string x_axis = ConvertUtility.Trim(Request.Form["x_axis"]);
                    string y_axis = ConvertUtility.Trim(Request.Form["y_axis"]);

                    UnitCtService unitService = new UnitCtService();
                    if (unitService.AddUnit(buildId, x_axis, y_axis, this.UserInfo.UserId))
                    {
                        Response.Write("true");
                    }
                    else
                    {
                        Response.Write("false");
                    }

                    Response.End();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
 public static bool Fill(string id, string cx_axis, string cy_axis)
 {
     try
     {
         MemberService memberService = new MemberService();
         string        createBy      = memberService.GetUserInfo().UserId;
         UnitCtService service       = new UnitCtService();
         if (service.AddUnit(id, cx_axis, cy_axis, createBy))
         {
             return(true);
         }
         return(false);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }