public GateTerminalEntityDC SaveGateTerminal(GateTerminalEntityDC member)
        {
            GateTerminalManager Manager = new GateTerminalManager();

            member = Manager.SaveGateTerminal(member);
            return(member);
        }
Esempio n. 2
0
        public GateTerminalEntityDC SaveGateTerminal(GateTerminalEntityDC member)
        {
            GateTerminalEntityDC           AdminDC   = new GateTerminalEntityDC();
            GateTerminalsServiceSoapClient membersrv = new GateTerminalsServiceSoapClient();

            return(membersrv.SaveGateTerminal(member));
        }
Esempio n. 3
0
        public GateTerminalEntityDC SaveGateTerminal(GateTerminalEntityDC member)
        {
            GateTerminalDAL memberDAL = new GateTerminalDAL();

            member = memberDAL.SaveGateTerminal(member);

            return(member);
        }
Esempio n. 4
0
        public GateTerminalEntityDC GetAllGateTerminalByGateTerminalID(Guid GateTerminalID)
        {
            GateTerminalEntityDC member    = new GateTerminalEntityDC();
            GateTerminalDAL      memberDAL = new GateTerminalDAL();

            member = memberDAL.GetAllGateTerminalByGateTerminalID(GateTerminalID);
            return(member);
        }
Esempio n. 5
0
        public GateTerminalListEntityDC GetAllGateTerminal(Guid AcctID, string Search, int PageIndex, int PageSize, out int Count)
        {
            GateTerminalListEntityDC productResponse = new GateTerminalListEntityDC();
            GateTerminalEntityDC     member          = new GateTerminalEntityDC();
            GateTerminalDAL          memberDAL       = new GateTerminalDAL();

            productResponse = memberDAL.GetAllGateTerminal(AcctID, Search, PageIndex, PageSize, out Count);
            return(productResponse);
        }
Esempio n. 6
0
        public GateTerminalEntityDC GetAllGateTerminalByGateTerminalID(Guid GateTerminalID)
        {
            GateTerminalEntityDC        Account     = new GateTerminalEntityDC();
            List <GateTerminalEntityDC> AccountList = new List <GateTerminalEntityDC>();

            using (DbConnection conn = DeLorean.CreateConnection())
            {
                conn.Open();
                try
                {
                    using (DbCommand sprocCmd = conn.CreateCommand())
                    {
                        sprocCmd.CommandType = CommandType.StoredProcedure;
                        sprocCmd.CommandText = GET_ALL_GATETERMINAL_BY_ALL_GATETERMINAL_ID;
                        sprocCmd.Parameters.Add(new SqlParameter("@GateTerminalID", GateTerminalID.ToGuid())
                        {
                            SqlDbType = SqlDbType.UniqueIdentifier
                        });



                        using (IDataReader sprocReader = DeLorean.ExecuteReader(sprocCmd))
                        {
                            while (sprocReader.Read())
                            {
                                Account.GateTerminalID   = sprocReader["GateTerminalID"].ToGuid();
                                Account.GateTerminalName = sprocReader["GateTerminalName"].ToStringDefault();
                                Account.AccountID        = sprocReader["AccountID"].ToGuid();
                                Account.GateTypeID       = sprocReader["GateTypeID"].ToInt();

                                Account.AccountName  = sprocReader["AccountName"].ToStringDefault();
                                Account.GateTypeName = sprocReader["GateTypeName"].ToStringDefault();

                                Account.IsActive    = sprocReader["IsActive"].ToBooleanDefault();
                                Account.CreatedBy   = sprocReader["CreatedBy"].ToStringDefault();
                                Account.CreatedDate = sprocReader["CreatedDate"].ToStringDefault();
                                Account.UpdatedBy   = sprocReader["UpdatedBy"].ToStringDefault();
                                Account.UpdatedDate = sprocReader["UpdatedDate"].ToStringDefault();
                            }
                        }
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conn != null)
                    {
                        conn.Close();
                    }
                }
            }

            return(Account);
        }
        public ActionResult SaveEmployee(GateTerminalModel model)
        {
            GateTerminalBLL      EmployeeBLL = new GateTerminalBLL();
            GateTerminalEntityDC data        = new GateTerminalEntityDC()
            {
                GateTerminalID   = model.GateTerminal.GateTerminalID,
                GateTerminalName = model.GateTerminal.GateTerminalName,
                IsActive         = model.GateTerminal.IsActive,
                CreatedBy        = model.GateTerminal.CreatedBy,
            };

            return(Json(EmployeeBLL.SaveGateTerminal(data), JsonRequestBehavior.AllowGet));
        }
        public ActionResult SaveGateTerminal(GateTerminalModel model)
        {
            ViewBag.user = global;
            //    try
            //   {

            string id     = model.GateTerminal.GateTerminalID.ToString();
            var    result = Regex.Replace(id, @"{}", string.Empty);
            //    Guid AcctID = result.ToString();
            GateTerminalBLL      GateTerminalBLL = new GateTerminalBLL();
            GateTerminalEntityDC data            = new GateTerminalEntityDC();



            data.GateTerminalID   = result.ToGuid();
            data.GateTerminalName = model.GateTerminal.GateTerminalName;
            data.AccountID        = model.GateTerminal.AccountID;
            data.GateTypeID       = model.GateTerminal.GateTypeID;
            data.IsActive         = model.GateTerminal.IsActive;
            data.CreatedBy        = global.GlobalUserName;

            return(Json(GateTerminalBLL.SaveGateTerminal(data), JsonRequestBehavior.AllowGet));
        }
Esempio n. 9
0
        public GateTerminalListEntityDC GetAllGateTerminal(Guid AcctID, string Search, int PageIndex, int PageSize, out int Count)
        {
            GateTerminalListEntityDC    Accounts    = new GateTerminalListEntityDC();
            List <GateTerminalEntityDC> AccountList = new List <GateTerminalEntityDC>();

            using (DbConnection conn = DeLorean.CreateConnection())
            {
                conn.Open();
                try
                {
                    using (DbCommand sprocCmd = conn.CreateCommand())
                    {
                        sprocCmd.CommandType = CommandType.StoredProcedure;
                        sprocCmd.CommandText = GET_ALL_GATETERMINAL_BY_ACCOUNT_ID;
                        sprocCmd.Parameters.Add(new SqlParameter("@AccountID", AcctID.ToGuid())
                        {
                            SqlDbType = SqlDbType.UniqueIdentifier
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@Search", Search.ToStringDefault())
                        {
                            SqlDbType = SqlDbType.NVarChar
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@PageIndex", PageIndex.ToInt())
                        {
                            SqlDbType = SqlDbType.Int
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@PageSize", PageSize.ToInt())
                        {
                            SqlDbType = SqlDbType.Int
                        });


                        var CountResult = sprocCmd.CreateParameter();
                        CountResult.ParameterName = "@Count";
                        CountResult.Direction     = ParameterDirection.Output;
                        CountResult.DbType        = DbType.Int32;
                        sprocCmd.Parameters.Add(CountResult);



                        using (IDataReader sprocReader = DeLorean.ExecuteReader(sprocCmd))
                        {
                            while (sprocReader.Read())
                            {
                                GateTerminalEntityDC Account = new GateTerminalEntityDC();
                                Account.GateTerminalID   = sprocReader["GateTerminalID"].ToGuid();
                                Account.GateTerminalName = sprocReader["GateTerminalName"].ToStringDefault();
                                Account.AccountID        = sprocReader["AccountID"].ToGuid();
                                Account.AccountName      = sprocReader["AccountName"].ToStringDefault();
                                Account.GateTypeID       = sprocReader["GateTypeID"].ToInt();
                                Account.GateTypeName     = sprocReader["GateTypeName"].ToStringDefault();
                                Account.IsActive         = sprocReader["IsActive"].ToBooleanDefault();
                                Account.CreatedBy        = sprocReader["CreatedBy"].ToStringDefault();
                                Account.CreatedDate      = sprocReader["CreatedDate"].ToStringDefault();
                                Account.UpdatedBy        = sprocReader["UpdatedBy"].ToStringDefault();
                                Account.UpdatedDate      = sprocReader["UpdatedDate"].ToStringDefault();
                                AccountList.Add(Account);
                            }
                        }
                        Accounts.GateTerminalList = AccountList;
                        Count = CountResult.Value.ToInt();
                    }
                }
                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conn != null)
                    {
                        conn.Close();
                    }
                }
            }

            return(Accounts);
        }
Esempio n. 10
0
        public GateTerminalEntityDC SaveGateTerminal(GateTerminalEntityDC parent)
        {
            Guid GateTerminalID = Guid.Empty;

            using (DbConnection conn = DeLorean.CreateConnection())
            {
                conn.Open();
                try
                {
                    using (DbCommand sprocCmd = conn.CreateCommand())
                    {
                        sprocCmd.CommandType = CommandType.StoredProcedure;
                        sprocCmd.CommandText = SAVE_GATETERMINAL;
                        sprocCmd.Parameters.Add(new SqlParameter("@GateTerminalID", parent.GateTerminalID.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.UniqueIdentifier
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@GateTerminalName", parent.GateTerminalName.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.NVarChar
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@IsActive", parent.IsActive.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.Bit
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@GateTypeID", parent.GateTypeID.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.Int
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@AccountID", parent.AccountID.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.UniqueIdentifier
                        });
                        sprocCmd.Parameters.Add(new SqlParameter("@CreatedBy", parent.CreatedBy.ToDatabaseObj())
                        {
                            SqlDbType = SqlDbType.NVarChar
                        });
                        using (IDataReader sprocReader = DeLorean.ExecuteReader(sprocCmd))
                        {
                            while (sprocReader.Read())
                            {
                                GateTerminalID        = sprocReader["GateTerminalID"].ToGuid();
                                parent.GateTerminalID = GateTerminalID;
                            }
                        }
                    }
                }

                catch (Exception ex)
                {
                    throw ex;
                }
                finally
                {
                    if (conn != null)
                    {
                        conn.Close();
                    }
                }
            }

            return(parent);
        }