Beispiel #1
0
        public string InsertOrUpdateTerminal(TerminalModel TM)
        {
            tbl_Terminal TBLT = new tbl_Terminal();

            TBLT.LocationID = TM.LocationID;
            TBLT.TerminalID = TM.TerminalID;
            return(TerminalBL.InsertOrUpdate(TBLT));
        }
Beispiel #2
0
        /// <summary>
        /// Insert or Update in tbl_terminal table -Vinod
        /// </summary>
        /// <param name="location"></param>
        /// <returns></returns>
        public string InsertOrUpdate(tbl_Terminal terminal)
        {
            List <tbl_Terminal> CurrentTerminal = this.GetparamById(terminal.LocationID.Trim(), terminal.TerminalID.Trim());

            string result = string.Empty;

            if (CurrentTerminal == null || CurrentTerminal.Count == 0)
            {
                return(result = this.Insert(terminal));
            }
            else
            {
                // return result = this.Update(location);
            }
            return(result);
        }
Beispiel #3
0
        /// <summary>
        /// Insert Terminal by Terminal model
        /// </summary>
        /// <param name="terminal"></param>
        /// <returns></returns>
        public string Insert(tbl_Terminal terminal)
        {
            try
            {
                Context.Terminal.Insert(terminal);
                Context.Terminal.Save();
                return(terminal.LocationID + " Inserted Successfully!!");
            }
            catch (Exception ex)
            {
                //POS Log Exception to db table

                return("Error in saving details, Please try again!!");
            }
            finally
            {
                // Context = null;
            }
        }