public ActionResult Edit()
 {
     Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer();
     Model.ContractCustomer        ContractCustomer     = Sys_ContractCustomer.GetInfo(Request["ID"]);
     ViewData["GetSexList"]  = GetSexList(ContractCustomer.Sex);
     ViewData["GetTypeList"] = GetTypeList(ContractCustomer.IsSign);
     ViewData["ID"]          = Request["ID"];
     return(View(ContractCustomer));
 }
 public ActionResult EditInfo(Model.ContractCustomer ContractCustomer)
 {
     Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer();
     ViewData["GetSexList"]  = GetSexList();
     ViewData["GetTypeList"] = GetTypeList();
     if (Sys_ContractCustomer.UpdateInfo(ContractCustomer))
     {
         return(Content("1"));
     }
     return(Content("0"));
 }
        public bool AddInfo(Model.ContractCustomer ContractCustomer)
        {
            const string sql =
                @"INSERT INTO ContractCustomer(RealName,Sex,phone,Address,CooperationDate,DockingProject,DockingprojectLeader,IsSign)
  VALUES(@RealName,@Sex,@phone,@Address,@CooperationDate,@DockingProject,@DockingprojectLeader,@IsSign)";

            return(Factory.DBHelper.ExecSQL(SQLConString, sql.ToString(), new DynamicParameters(new
            {
                ContractCustomer.RealName,
                ContractCustomer.Sex,
                ContractCustomer.phone,
                ContractCustomer.Address,
                ContractCustomer.CooperationDate,
                ContractCustomer.DockingProject,
                ContractCustomer.DockingprojectLeader,
                ContractCustomer.IsSign,
            })));
        }
        public bool UpdateInfo(Model.ContractCustomer ContractCustomer)
        {
            const string sql =
                @"UPDATE ContractCustomer SET RealName=@RealName,Sex=@Sex,phone=@phone,Address=@Address,CooperationDate=@CooperationDate,DockingProject=@DockingProject,
DockingprojectLeader=@DockingprojectLeader,IsSign=@IsSign  WHERE ID=@ID";

            return(Factory.DBHelper.ExecSQL(SQLConString, sql.ToString(), new DynamicParameters(new
            {
                ContractCustomer.RealName,
                ContractCustomer.Sex,
                ContractCustomer.phone,
                ContractCustomer.Address,
                ContractCustomer.CooperationDate,
                ContractCustomer.DockingProject,
                ContractCustomer.DockingprojectLeader,
                ContractCustomer.IsSign,
                ContractCustomer.ID,
            })));
        }