Пример #1
0
        public int DeleteHomeRepair(string id)
        {
            SqlParameter param = new SqlParameter("@ID", SqlDbType.VarChar, 18);

            param.Value = id;
            int result = SqlHelp.ExecuteNonQuery("prc_DeleteHomeRepair", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #2
0
        public int DeleteBasePark(int parkID)
        {
            SqlParameter param = new SqlParameter("@ParkID", SqlDbType.Int);

            param.Value = parkID;
            int result = SqlHelp.ExecuteNonQuery("prc_DeleteBasePark", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #3
0
        public int UpdateHomeRepairCheck(HomeRepairModel homerepair)
        {
            SqlParameter[] param = { new SqlParameter("@ID", SqlDbType.VarChar, 18), new SqlParameter("@OwnerText", SqlDbType.Text) };
            param[0].Value = homerepair.ID;
            param[1].Value = homerepair.OwnerText;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateHomeRepairCheck", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #4
0
        public int UpdateChargeFreeType(ChargeFreeTypeModel chargeFeeType)
        {
            SqlParameter[] param = { new SqlParameter("@TypeID", SqlDbType.Int), new SqlParameter("@Price", SqlDbType.Float) };
            param[0].Value = chargeFeeType.TypeID;
            param[1].Value = chargeFeeType.Price;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateChargeFreeType", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #5
0
        public int DeleteFix(string fixID)
        {
            SqlParameter param = new SqlParameter("@FixID", SqlDbType.VarChar, 18);

            param.Value = fixID;
            int result = SqlHelp.ExecuteNonQuery("prc_DeleteFix", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #6
0
        public int UpdateHomeReportForProcess(HomeReportModel homereport)
        {
            SqlParameter[] param = { new SqlParameter("@ID", SqlDbType.VarChar, 18), new SqlParameter("@FinishText", SqlDbType.Text) };
            param[0].Value = homereport.ID;
            param[1].Value = homereport.FinshText;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateHomeReportForProcess", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #7
0
        public int DeletePavilion(string paID)
        {
            SqlParameter param = new SqlParameter("@PaID", SqlDbType.VarChar, 3);

            param.Value = paID;
            int result = SqlHelp.ExecuteNonQuery("prc_DeletePavilion", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #8
0
        public int UpdatePassword(int id, string password)
        {
            SqlParameter[] param = { new SqlParameter("@ID", SqlDbType.Int, 4), new SqlParameter("@password", SqlDbType.VarChar, 20) };
            param[0].Value = id;
            param[1].Value = password;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdatePassword", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #9
0
        public int DeleteNews(int id)
        {
            SqlParameter param = new SqlParameter("@ID", SqlDbType.Int);

            param.Value = id;
            int result = SqlHelp.ExecuteNonQuery("prc_DeleteNews", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #10
0
        public int UpdateFixRepairForSign(FixRepairModel fixRepair)
        {
            SqlParameter[] param = { new SqlParameter("@ID", SqlDbType.VarChar, 18), new SqlParameter("@Sign", SqlDbType.Int) };
            param[0].Value = fixRepair.ID;
            param[1].Value = fixRepair.Sign;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateFixRepairForSign", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #11
0
        public int DeleteRoom(string code)
        {
            SqlParameter param = new SqlParameter("@code", SqlDbType.VarChar, 9);

            param.Value = code;
            int result = SqlHelp.ExecuteNonQuery("prc_DeleteRoom", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #12
0
        public int InsertType(TypeModel type)
        {
            SqlParameter[] param = { new SqlParameter("@TypeID", SqlDbType.Int), new SqlParameter("@Name", SqlDbType.VarChar, 20) };
            param[0].Value = type.TypeID;
            param[1].Value = type.Name;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertType", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #13
0
        public int InsertChargeFeeType(ChargeFreeTypeModel chargeFeeType)
        {
            SqlParameter[] param = { new SqlParameter("@Name",   SqlDbType.VarChar, 20), new SqlParameter("@Price", SqlDbType.Float),
                                     new SqlParameter("@Format", SqlDbType.VarChar, 20) };
            param[0].Value = chargeFeeType.TypeName;
            param[1].Value = chargeFeeType.Price;
            param[2].Value = chargeFeeType.Format;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertChargeFeeType", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #14
0
        public int UpdateHomeFreeForBargian(HomeFreeModel homeFree)
        {
            SqlParameter[] param = { new SqlParameter("@ID",         SqlDbType.Int),    new SqlParameter("@FactPayMent", SqlDbType.Money),
                                     new SqlParameter("@HandleName", SqlDbType.VarChar, 20) };
            param[0].Value = homeFree.ID;
            param[1].Value = homeFree.FactPayment;
            param[2].Value = homeFree.HandleName;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateHomeFreeForBargian", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #15
0
        public int InsertNotice(NewsModel news)
        {
            SqlParameter[] param = { new SqlParameter("@Title",        SqlDbType.VarChar, 50), new SqlParameter("@NoticeContent", SqlDbType.Text),
                                     new SqlParameter("@NoticePerSon", SqlDbType.VarChar, 20) };
            param[0].Value = news.Title;
            param[1].Value = news.NoticeContent;
            param[2].Value = news.NoticePerson;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertNews", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #16
0
        public int InsertBasePark(BaseParkModel basePark)
        {
            SqlParameter[] param = { new SqlParameter("@Name", SqlDbType.VarChar, 20), new SqlParameter("@Amount", SqlDbType.Int),
                                     new SqlParameter("@Memo", SqlDbType.VarChar, 50) };
            param[0].Value = basePark.Name;
            param[1].Value = basePark.Amount;
            param[2].Value = basePark.Memo;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertBasePark", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #17
0
        public int InsertAd(AdModel ads)
        {
            SqlParameter[] param = { new SqlParameter("@Name", SqlDbType.VarChar, 20), new SqlParameter("@PhotoPath", SqlDbType.VarChar, 255),
                                     new SqlParameter("@Url",  SqlDbType.VarChar, 255) };
            param[0].Value = ads.AdName;
            param[1].Value = ads.PhotoPath;
            param[2].Value = ads.Url;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertAd", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #18
0
        public int UpdateHomeReport(HomeReportModel homereport)
        {
            SqlParameter[] param = { new SqlParameter("@ID",         SqlDbType.VarChar,                            18), new SqlParameter("@ReportDate", SqlDbType.DateTime, 10),
                                     new SqlParameter("@ReportText", SqlDbType.Text),   new SqlParameter("@ReportMemo", SqlDbType.Text) };
            param[0].Value = homereport.ID;
            param[1].Value = homereport.ReportDate;
            param[2].Value = homereport.ReportText;
            param[3].Value = homereport.ReportMemo;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateHomeReport", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #19
0
        public int UpdateHomeRepairForProcess(HomeRepairModel homerepair)
        {
            SqlParameter[] param = { new SqlParameter("@ID",      SqlDbType.VarChar,                            18), new SqlParameter("@Varperson", SqlDbType.VarChar, 20),
                                     new SqlParameter("@VarText", SqlDbType.Text),   new SqlParameter("@RepairUnit", SqlDbType.VarChar, 50) };
            param[0].Value = homerepair.ID;
            param[1].Value = homerepair.Varperson;
            param[2].Value = homerepair.VarText;
            param[3].Value = homerepair.RepairUnit;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateHomeRepairForProcess", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #20
0
        public int InsertHomeRepair(HomeRepairModel homerepair)
        {
            SqlParameter[] param = { new SqlParameter("@ID",         SqlDbType.VarChar,                            18), new SqlParameter("@Code", SqlDbType.VarChar, 9),
                                     new SqlParameter("@RepairText", SqlDbType.Text),   new SqlParameter("@RepairMemo", SqlDbType.Text) };
            param[0].Value = homerepair.ID;
            param[1].Value = homerepair.Code;
            param[2].Value = homerepair.RepairText;
            param[3].Value = homerepair.RepairMemo;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertHomeRepair", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #21
0
        public int InsertAreaFact(AreaFactModel areafact)
        {
            SqlParameter[] param = { new SqlParameter("@FactName", SqlDbType.VarChar, 50), new SqlParameter("@MainHead", SqlDbType.VarChar,                      20),
                                     new SqlParameter("@Tel",      SqlDbType.VarChar, 13), new SqlParameter("@TypeID",   SqlDbType.Int),    new SqlParameter("@Memo", SqlDbType.Text) };
            param[0].Value = areafact.FactName;
            param[1].Value = areafact.MainHead;
            param[2].Value = areafact.Tel;
            param[3].Value = areafact.TypeID;
            param[4].Value = areafact.Memo;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertAreaFact", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #22
0
        public int InsertFix(FixModel fix)
        {
            SqlParameter[] param = { new SqlParameter("@FixID",       SqlDbType.VarChar,                          18), new SqlParameter("@Name", SqlDbType.VarChar, 20),
                                     new SqlParameter("@Amount",      SqlDbType.Int),     new SqlParameter("@Factory", SqlDbType.VarChar,                      20),
                                     new SqlParameter("@FactoryDate", SqlDbType.DateTime, 10) };
            param[0].Value = fix.FixID;
            param[1].Value = fix.Name;
            param[2].Value = fix.Amount;
            param[3].Value = fix.Factory;
            param[4].Value = fix.FactoryDate;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertFix", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #23
0
        public int InsertHomeFree(HomeFreeModel homeFree)
        {
            SqlParameter[] param = { new SqlParameter("@Code",    SqlDbType.VarChar,                             9), new SqlParameter("@TypeID",  SqlDbType.Int),
                                     new SqlParameter("@Number",  SqlDbType.Float),   new SqlParameter("@StartDate", SqlDbType.DateTime,                        10),
                                     new SqlParameter("@PayDate", SqlDbType.DateTime,                           10), new SqlParameter("@AddName", SqlDbType.VarChar, 20) };
            param[0].Value = homeFree.Code;
            param[1].Value = homeFree.TypeID;
            param[2].Value = homeFree.Number;
            param[3].Value = homeFree.StartDate;
            param[4].Value = homeFree.PayDate;
            param[5].Value = homeFree.AddName;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertHomeChargeFee", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #24
0
        public int InsertHomePark(HomeParkModel homePark)
        {
            SqlParameter[] param = { new SqlParameter("@ParkID",  SqlDbType.Int),     new SqlParameter("@Code", SqlDbType.VarChar,                        9),
                                     new SqlParameter("@CarID",   SqlDbType.VarChar,                       20), new SqlParameter("@Type",  SqlDbType.VarChar,20),
                                     new SqlParameter("@BuyDate", SqlDbType.DateTime,                      10), new SqlParameter("@Color", SqlDbType.VarChar, 20) };
            param[0].Value = homePark.ParkID;
            param[1].Value = homePark.Code;
            param[2].Value = homePark.CarID;
            param[3].Value = homePark.Type;
            param[4].Value = homePark.BuyDate;
            param[5].Value = homePark.Color;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertHomePark", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #25
0
        public bool BackupDataBase(string path)
        {
            SqlParameter param = new SqlParameter("@Path", SqlDbType.VarChar, 255);

            param.Value = path;
            try
            {
                SqlHelp.ExecuteNonQuery("prc_BackupDataBase", CommandType.StoredProcedure, param);
            }
            catch
            {
                return(false);
            }
            return(true);
        }
Пример #26
0
        public int UpdateRoom(RoomModel room)
        {
            SqlParameter[] param = { new SqlParameter("@Code",         SqlDbType.VarChar,                            9), new SqlParameter("@SunnyID", SqlDbType.Int),
                                     new SqlParameter("@IndoorID",     SqlDbType.Int),    new SqlParameter("@RoomUseID", SqlDbType.Int),
                                     new SqlParameter("@RoomFormatID", SqlDbType.Int),    new SqlParameter("@BuildArea", SqlDbType.Float),
                                     new SqlParameter("@UseArea",      SqlDbType.Float) };
            param[0].Value = room.Code;
            param[1].Value = room.SunnyID;
            param[2].Value = room.IndoorID;
            param[3].Value = room.RoomUseID;
            param[4].Value = room.RoomFormatID;
            param[5].Value = room.BuildArea;
            param[6].Value = room.UseArea;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateRoom", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #27
0
        public int UpdateEmployee(EmployeeModel employee)
        {
            SqlParameter[] param = { new SqlParameter("@Name",      SqlDbType.VarChar, 20), new SqlParameter("@ID",      SqlDbType.Int),
                                     new SqlParameter("@Arrage",    SqlDbType.VarChar, 20), new SqlParameter("@Address", SqlDbType.VarChar, 30),
                                     new SqlParameter("@Tel",       SqlDbType.VarChar, 12), new SqlParameter("@Mobile",  SqlDbType.VarChar, 12),
                                     new SqlParameter("@PhotoPath", SqlDbType.VarChar, 255) };
            param[0].Value = employee.EmlpoyeeName;
            param[1].Value = employee.ID;
            param[2].Value = employee.Arrage;
            param[3].Value = employee.Address;
            param[4].Value = employee.Tel;
            param[5].Value = employee.Mobile;
            param[6].Value = employee.PhotoPath;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateEmployee", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #28
0
        public int InsertPavilion(PavilionModel pavilion)
        {
            SqlParameter[] param = { new SqlParameter("@PaID",  SqlDbType.VarChar,                              3), new SqlParameter("@Name", SqlDbType.VarChar, 20),
                                     new SqlParameter("@Layer", SqlDbType.SmallInt), new SqlParameter("@Height",    SqlDbType.Float),
                                     new SqlParameter("@Area",  SqlDbType.Float),    new SqlParameter("@BuildDate", SqlDbType.DateTime,                     10),
                                     new SqlParameter("@Memo",  SqlDbType.Text),     new SqlParameter("@TypeID",    SqlDbType.Int) };
            param[0].Value = pavilion.PaID;
            param[1].Value = pavilion.Name;
            param[2].Value = pavilion.Layer;
            param[3].Value = pavilion.Height;
            param[4].Value = pavilion.Area;
            param[5].Value = pavilion.BuildDate;
            param[6].Value = pavilion.Memo;
            param[7].Value = pavilion.TypeID;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertPavilion", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #29
0
        public int UpdateFixRepair(FixRepairModel fixRepair)
        {
            SqlParameter[] param = { new SqlParameter("@FixID",      SqlDbType.VarChar,                              18), new SqlParameter("@RepairDate", SqlDbType.DateTime, 10),
                                     new SqlParameter("@EndDate",    SqlDbType.DateTime,                             10), new SqlParameter("@MainHead",   SqlDbType.VarChar,  20),
                                     new SqlParameter("@ServiceFee", SqlDbType.Money),   new SqlParameter("@MaterielFee", SqlDbType.Money),
                                     new SqlParameter("@RepairSum",  SqlDbType.Money),   new SqlParameter("@RepairMemo",  SqlDbType.Text),
                                     new SqlParameter("@Sign",       SqlDbType.Int),     new SqlParameter("@RepairUnit",  SqlDbType.VarChar, 50) };
            param[0].Value = fixRepair.FixID;
            param[1].Value = fixRepair.RepairDate;
            param[2].Value = fixRepair.EndDate;
            param[3].Value = fixRepair.MainHead;
            param[4].Value = fixRepair.ServiceFee;
            param[5].Value = fixRepair.MaterielFee;
            param[6].Value = fixRepair.RepairSum;
            param[7].Value = fixRepair.RepairMemo;
            param[8].Value = fixRepair.Sign;
            param[9].Value = fixRepair.RepairUnit;
            int result = SqlHelp.ExecuteNonQuery("prc_UpdateFixRepair", CommandType.StoredProcedure, param);

            return(result);
        }
Пример #30
0
        public int InsertBaseInfo(BaseInfoModel baseinfo)
        {
            SqlParameter[] param = { new SqlParameter("@HomeName",  SqlDbType.VarChar,                           20), new SqlParameter("@MainHead",    SqlDbType.VarChar,  20),
                                     new SqlParameter("@BuildDate", SqlDbType.DateTime,                          10), new SqlParameter("@BuildArea",   SqlDbType.Float),
                                     new SqlParameter("@Amount",    SqlDbType.Int,                                4), new SqlParameter("@Address",     SqlDbType.VarChar, 255),
                                     new SqlParameter("@GreenArea", SqlDbType.Float),   new SqlParameter("@RoadArea", SqlDbType.Float),
                                     new SqlParameter("@Tel",       SqlDbType.VarChar,                           18), new SqlParameter("@ParkingArea", SqlDbType.Float),
                                     new SqlParameter("@Memo",      SqlDbType.Text) };
            param[0].Value  = baseinfo.HomeName;
            param[1].Value  = baseinfo.MainHead;
            param[2].Value  = baseinfo.BuildDate;
            param[3].Value  = baseinfo.BuildArea;
            param[4].Value  = baseinfo.Amount;
            param[5].Value  = baseinfo.Address;
            param[6].Value  = baseinfo.GreenArea;
            param[7].Value  = baseinfo.RoadArea;
            param[8].Value  = baseinfo.Tel;
            param[9].Value  = baseinfo.ParkingArea;
            param[10].Value = baseinfo.Memo;
            int result = SqlHelp.ExecuteNonQuery("prc_InsertBaseInfo", CommandType.StoredProcedure, param);

            return(result);
        }