Exemple #1
0
        ///<summary>
        ///PHARMACIST_OPENTIMES
        /// </summary>
        public static void insert2PHARMACIST_OPENTIMES(PHARMACIST_OPENTIMES newPHARMACIST_OPENTIMES)
        {
            string connectString = System.Configuration.ConfigurationManager.ConnectionStrings["LinqToSQLDBConnectionString"].ToString();

            ECMSDataContext db = new ECMSDataContext(connectString);

            //Add new PHARMACIST_OPENTIMES to database
            db.PHARMACIST_OPENTIMES.InsertOnSubmit(newPHARMACIST_OPENTIMES);

            //Save changes to Database.
            db.SubmitChanges();
        }
Exemple #2
0
        public static void updatePHARMACIST_OPENTIMES(string str_id, PHARMACIST_OPENTIMES updatePHARMACIST_OPENTIMES)
        {
            string connectString = System.Configuration.ConfigurationManager.ConnectionStrings["LinqToSQLDBConnectionString"].ToString();

            ECMSDataContext db = new ECMSDataContext(connectString);

            //Get PHARMACIST_OPENTIMES for update
            PHARMACIST_OPENTIMES oldPHARMACIST_OPENTIMES = db.PHARMACIST_OPENTIMES.FirstOrDefault(e => e.id.Equals(str_id));

            oldPHARMACIST_OPENTIMES = updatePHARMACIST_OPENTIMES;

            //Save changes to Database.
            db.SubmitChanges();
        }