예제 #1
0
        private void RefreshHandData_Click(object sender, EventArgs e)
        {
            var model = new BasDataHand
            {
                MgMonth    = MG_Month.Text,
                MgDay      = "1",
                MgHour     = "2",
                MgMinites  = "3",
                MgDistance = "4",
                MgPower    = "5"
            };

            DataHand ownerData = IBLL.HiInstanceBll.DataHandBll();
            var      blResult  = IBLL.HiInstanceBll.DataHandBll().Add(model);

            MessageBox.Show(blResult ? "Success" : "Fail");
        }
예제 #2
0
파일: DataHand.cs 프로젝트: fengxing1121/Hi
        public bool Add(BasDataHand model)
        {
            if (model == null)
            {
                return(false);
            }

            var strb = new StringBuilder();

            strb.Append(" Insert Into bas_Data_Hand ");
            strb.Append(" ( ");
            strb.Append("MG_Month, ");
            strb.Append("MG_Day, ");
            strb.Append("MG_Hour, ");
            strb.Append("MG_Minites, ");
            strb.Append("MG_Distance, ");
            strb.Append("MG_Power ");
            strb.Append(" )");
            strb.Append(" Values( ");
            strb.Append("" + model.MgMonth + ", ");
            strb.Append("'" + model.MgDay + "', ");
            strb.Append("'" + model.MgHour + "', ");
            strb.Append("'" + model.MgMinites + "', ");
            strb.Append("'" + model.MgDistance + "', ");
            strb.Append("'" + model.MgPower + "' ");
            strb.Append(" )");

            try
            {
                return(DataBase.ExecuteNonQuery(strb.ToString()) > 0);
            }
            catch (Exception ex)
            {
                Debug.WriteLine(ex.Message);
                return(false);
            }
        }
예제 #3
0
파일: DataHand.cs 프로젝트: fengxing1121/Hi
 public bool Delete(BasDataHand model)
 {
     throw new NotImplementedException();
 }
예제 #4
0
파일: DataHand.cs 프로젝트: fengxing1121/Hi
 public bool Add(BasDataHand model)
 {
     return(_dal.Add(model));
 }