Пример #1
0
 /// <summary>
 /// Execute the sql of update one data to table
 /// </summary>
 /// <param name="crafts_Production_Modle"></param>
 /// <param name="oldProductionName"></param>
 /// <returns></returns>
 public int Update_One_Production_Table(Crafts_Production_Modle crafts_Production_Modle, string oldProductionName)
 {
     using (var con = GetOpenConnection())
     {
         return(con.Execute(crafts_Production_Dal.Update_One_Production_Table(crafts_Production_Modle, oldProductionName)));
     }
 }
Пример #2
0
 /// <summary>
 /// Execute the sql of insert one data to table
 /// </summary>
 /// <param name="crafts_Production_Modle"></param>
 /// <returns></returns>
 public int Insert_One_Production_Table(Crafts_Production_Modle crafts_Production_Modle)
 {
     using (var con = GetOpenConnection())
     {
         return(con.Execute(crafts_Production_Dal.Insert_One_Production_Table(crafts_Production_Modle)));
     }
 }
Пример #3
0
        /// <summary>
        /// the sql of insert one data to table
        /// </summary>
        /// <param name="crafts_Production_Modle"></param>
        /// <returns></returns>
        public string Insert_One_Production_Table(Crafts_Production_Modle crafts_Production_Modle)
        {
            string _insert_one_production = "INSERT INTO [AMS].[dbo].[Crafts_Production]"
                                            + "([ProductionName],[ProductionNo],[ProductionDescripe],[ProductionRule]) VALUES "
                                            + "('" + crafts_Production_Modle.ProductionName + "','"
                                            + crafts_Production_Modle.ProductionNo + "','"
                                            + crafts_Production_Modle.ProductionDescripe + "','" + crafts_Production_Modle.ProductionRule + "')";

            return(_insert_one_production);
        }
Пример #4
0
        /// <summary>
        /// the sql of update one data to table
        /// </summary>
        /// <param name="crafts_Production_Modle"></param>
        /// <param name="oldProductionName"></param>
        /// <returns></returns>
        public string Update_One_Production_Table(Crafts_Production_Modle crafts_Production_Modle, string oldProductionName)
        {
            string _update_one_production = "UPDATE [AMS].[dbo].[Crafts_Production]"
                                            + "SET [ProductionName] = '" + crafts_Production_Modle.ProductionName
                                            + "',[ProductionNo] = '" + crafts_Production_Modle.ProductionNo
                                            + "',[ProductionDescripe] = '" + crafts_Production_Modle.ProductionDescripe
                                            + "',[ProductionRule] = '" + crafts_Production_Modle.ProductionRule
                                            + "' WHERE ProductionName = '" + oldProductionName + "'";

            return(_update_one_production);
        }