Example #1
0
        /// <summary>
        /// 获得代用券信息
        /// </summary>
        /// <param name="voucherbatchid"></param>
        /// <returns></returns>
        public static Flamingo.Entity.Para_Voucher GetVoucherSubstitute(string voucherbatchid)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_VoucherBatchId", MySqlDbType.VarChar, 10)
            };
            parameters[0].Value = voucherbatchid;
            DataTable dt = DbHelperMySQL.RunProcedure("proc_voucherbatch_getByVoucherBatchId", parameters, "getByVoucherBatchId").Tables[0];

            Flamingo.Entity.Para_Voucher model = new Entity.Para_Voucher();

            if (dt.Rows.Count > 0)
            {
                model.VoucherBatchId   = dt.Rows[0]["VoucherBatchId"].ToString();
                model.VoucherName      = dt.Rows[0]["VoucherName"].ToString();
                model.VoucherTypeId    = Int32.Parse(dt.Rows[0]["VoucherTypeId"].ToString());
                model.VoucherType      = dt.Rows[0]["VoucherTypeName"].ToString();
                model.BeginDate        = DateTime.Parse(dt.Rows[0]["ReleaseDate"].ToString());
                model.EndDate          = DateTime.Parse(dt.Rows[0]["ExpireDate"].ToString());
                model.Price            = float.Parse(dt.Rows[0]["UnitPrice"].ToString());
                model.SerialScope      = dt.Rows[0]["SerialScope"].ToString();
                model.VoucherPrice     = float.Parse(dt.Rows[0]["VoucherPrice"].ToString());
                model.VoucherSubTypeId = Int32.Parse(dt.Rows[0]["VoucherSubTypeId"].ToString());
                model.VoucherSubType   = dt.Rows[0]["VoucherSubTypeName"].ToString();
                model.AllowUse         = true;
                model.ErrorMsg         = string.Empty;
            }
            return(model);
        }
Example #2
0
 /// <summary>
 /// 获得影厅
 /// </summary>
 /// <param name="theaterid"></param>
 /// <returns></returns>
 public static DataTable GetHall(string theaterid)
 {
     MySqlParameter[] parameters =
     {
         new MySqlParameter("@_TheaterId", MySqlDbType.VarChar, 8)
     };
     parameters[0].Value = theaterid;
     return(DbHelperMySQL.RunProcedure("proc_hall_sel", parameters, "hall_sel").Tables[0]);
 }
Example #3
0
        /// <summary>
        /// 获得客户列表 模糊customername
        /// </summary>
        /// <param name="customername"></param>
        /// <returns></returns>
        public static DataTable GetCustomer(string customername)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_CustomerName", MySqlDbType.VarChar, 16)
            };
            parameters[0].Value = customername;
            DataTable dt = DbHelperMySQL.RunProcedure("proc_customer_getByNameLike", parameters, "getByNameLike").Tables[0];

            return(dt);
        }
Example #4
0
 /// <summary>
 /// 获得场次信息-补登Combox
 /// </summary>
 /// <param name="dailyplanid"></param>
 /// <param name="hallid"></param>
 /// <returns></returns>
 public static DataTable GetShowPlanInfo(string dailyplanid, string hallid)
 {
     MySqlParameter[] parameters =
     {
         new MySqlParameter("@_DailyPlanId", MySqlDbType.VarChar, 8),
         new MySqlParameter("@_HallId",      MySqlDbType.VarChar, 2)
     };
     parameters[0].Value = dailyplanid;
     parameters[1].Value = hallid;
     return(DbHelperMySQL.RunProcedure("proc_showplan_selFillUp", parameters, "showplan_selFillUp").Tables[0]);
 }
Example #5
0
 /// <summary>
 /// 获得服务器动作结果
 /// </summary>
 /// <param name="serverdirectionid"></param>
 /// <returns></returns>
 public static int GetServerDirectionResult(int serverdirectionid)
 {
     MySqlParameter[] parameters =
     {
         new MySqlParameter("@_ServerDirectionId", MySqlDbType.Int32, 4),
         new MySqlParameter("@_Result",            MySqlDbType.Int32, 4)
     };
     parameters[0].Value     = serverdirectionid;
     parameters[1].Direction = ParameterDirection.Output;
     DbHelperMySQL.RunProcedure("proc_serverdirection_selResult", parameters, "serverdirection_selResult");
     return(int.Parse(parameters[1].Value.ToString()));
 }
Example #6
0
 /// <summary>
 /// 添加立即备份动作
 /// </summary>
 /// <param name="userid"></param>
 public static int AddServerDirection(int userid)
 {
     MySqlParameter[] parameters =
     {
         new MySqlParameter("@_UserId",            MySqlDbType.Int32, 4),
         new MySqlParameter("@_ServerDirectionId", MySqlDbType.Int32, 4)
     };
     parameters[0].Value     = userid;
     parameters[1].Direction = ParameterDirection.Output;
     DbHelperMySQL.RunProcedure("proc_serverdirection_add", parameters, "serverdirection_add");
     return(Int32.Parse(parameters[1].Value.ToString()));
 }
Example #7
0
        /// <summary>
        /// 获得用户列表
        /// </summary>
        /// <returns></returns>
        public static DataTable GetList()
        {
            StringBuilder strSql = new StringBuilder();

            strSql.Append("select * from user limit 0,100 ");
            //MySqlParameter[] parameters = {
            //        new MySqlParameter("@UserId", MySqlDbType.VarChar,16)};
            //parameters[0].Value = UserId;

            //return DbHelperMySQL.Query(strSql.ToString()).Tables[0];

            return(DbHelperMySQL.RunProcedure("proc_User_GetList", null, "User_GetList").Tables[0]);
        }
Example #8
0
        /// <summary>
        /// 添加备份日志
        /// </summary>
        /// <param name="_ServerDirectionId"></param>
        /// <param name="_BackupDate"></param>
        /// <param name="_Result"></param>
        public static void AddBackUpLog(int _ServerDirectionId, DateTime _BackupDate, int _Result)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_ServerDirectionId", MySqlDbType.Int32,     4),
                new MySqlParameter("@_BackupDate",        MySqlDbType.DateTime),
                new MySqlParameter("@_Result",            MySqlDbType.Int32, 4)
            };
            parameters[0].Value = _ServerDirectionId;
            parameters[1].Value = _BackupDate;
            parameters[2].Value = _Result;
            int outint;

            DbHelperMySQL.RunProcedure("server_backuplog_add", parameters, out outint);
        }
Example #9
0
        /// <summary>
        /// 锁定多个座位状态
        /// </summary>
        /// <param name="seatids">座位状态ID集合 |</param>
        /// <param name="showplanid">场次ID</param>
        /// <param name="lockedby">锁定人</param>
        /// <returns>座位状态集合</returns>
        public static DataTable Lock(StringBuilder seatstatusids, string showplanid, int lockedby)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@seatstatusids", MySqlDbType.Text),
                new MySqlParameter("@slid",          MySqlDbType.VarChar,12),
                new MySqlParameter("@lkid",          MySqlDbType.Int32, 4)
            };
            parameters[0].Value = seatstatusids.ToString();
            parameters[1].Value = showplanid;
            parameters[2].Value = lockedby;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_seatstatus_lockALot", parameters, "lockALot");

            return(ds.Tables[ds.Tables.Count - 1]);
        }
Example #10
0
        /// <summary>
        /// 获取可用日计划的ID和日期
        /// </summary>
        /// <param name="pageindex">第几页</param>
        /// <param name="pagecount">每页数量</param>
        /// <param name="totalpage">总页数</param>
        /// <returns></returns>
        public static DataSet GetDateChoose(int pageindex, int pagecount, out int totalpage)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@pageindex", MySqlDbType.Int32, 4),
                new MySqlParameter("@pagecount", MySqlDbType.Int32, 4),
                new MySqlParameter("@totalpage", MySqlDbType.Int32, 4)
            };
            parameters[0].Value     = pageindex;
            parameters[1].Value     = pagecount;
            parameters[2].Direction = ParameterDirection.Output;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_dailyplan_getDateChoose", parameters, "getDateChoose");

            totalpage = Int32.Parse(parameters[2].Value.ToString());
            return(ds);
        }
Example #11
0
 /// <summary>
 /// 编辑备份设置信息
 /// </summary>
 /// <param name="BackupSettingId"></param>
 /// <param name="BackupTime"></param>
 /// <param name="RepeatDay"></param>
 /// <param name="DatabasePath"></param>
 /// <param name="BackupPath"></param>
 public static void EditBackUpSetting(int BackupSettingId, string BackupTime, int RepeatDay, string DatabasePath, string BackupPath)
 {
     MySqlParameter[] parameters =
     {
         new MySqlParameter("@_BackupSettingId", MySqlDbType.Int32,     4),
         new MySqlParameter("@_BackupTime",      MySqlDbType.VarChar,   8),
         new MySqlParameter("@_RepeatDay",       MySqlDbType.Int32,     4),
         new MySqlParameter("@_DatabasePath",    MySqlDbType.VarChar, 255),
         new MySqlParameter("@_BackupPath",      MySqlDbType.VarChar, 255)
     };
     parameters[0].Value = BackupSettingId;
     parameters[1].Value = BackupTime;
     parameters[2].Value = RepeatDay;
     parameters[3].Value = DatabasePath;
     parameters[4].Value = BackupPath;
     DbHelperMySQL.RunProcedure("proc_backupsetting_edit", parameters, "backupsetting_edit");
 }
Example #12
0
        /// <summary>
        /// 取消多个座位的锁定状态
        /// </summary>
        /// <param name="seatstatusids">座位状态ID集合 |</param>
        /// <param name="lockedby">锁定人</param>
        /// <returns></returns>
        public static bool CancelLock(string seatstatusids, string lockedby)
        {
            bool tf = false;

            MySqlParameter[] parameters =
            {
                new MySqlParameter("@seatstatusids", MySqlDbType.Text),
                new MySqlParameter("@lkid",          MySqlDbType.VarChar,16),
                new MySqlParameter("@_isTrue",       MySqlDbType.Int16)
            };
            parameters[0].Value     = seatstatusids;
            parameters[1].Value     = lockedby;
            parameters[2].Direction = ParameterDirection.Output;
            DbHelperMySQL.RunProcedure("proc_seatstatus_cancelLockALot", parameters, "cancelLockALot");
            tf = parameters[2].Value.ToString() == "1" ? true : false;
            return(tf);
        }
Example #13
0
        /// <summary>
        /// 取消一个座位的锁定状态
        /// </summary>
        /// <param name="showplanid">场计划ID</param>
        /// <param name="seatid">座位ID</param>
        /// <param name="lockedby">锁定人</param>
        /// <returns>座位状态</returns>
        public static int CancelLock(string showplanid, string seatid, int lockedby)
        {
            int status = 0;

            MySqlParameter[] parameters =
            {
                new MySqlParameter("@slid",    MySqlDbType.VarChar,  8),
                new MySqlParameter("@stid",    MySqlDbType.VarChar, 12),
                new MySqlParameter("@lkid",    MySqlDbType.Int32,    4),
                new MySqlParameter("@revalue", MySqlDbType.Int32, 4)
            };
            parameters[0].Value     = showplanid;
            parameters[1].Value     = seatid;
            parameters[2].Value     = lockedby;
            parameters[3].Direction = ParameterDirection.Output;
            DbHelperMySQL.RunProcedure("proc_seatstatus_cancelLock", parameters, "lock");
            status = Int32.Parse(parameters[3].Value.ToString());
            return(status);
        }
Example #14
0
        /// <summary>
        /// 获得在日计划中的影片ID和影片名称
        /// </summary>
        /// <param name="pageindex">第几页</param>
        /// <param name="pagecount">每页数量</param>
        /// <param name="totalpage">总页数(output)</param>
        /// <param name="dailyplanid">日计划ID</param>
        /// <returns></returns>
        public static DataSet GetFilmChoose(int pageindex, int pagecount, out int totalpage, string dailyplanid, string theaterid)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@pageindex",  MySqlDbType.Int32,   4),
                new MySqlParameter("@pagecount",  MySqlDbType.Int32,   4),
                new MySqlParameter("@totalpage",  MySqlDbType.Int32,   4),
                new MySqlParameter("@dpid",       MySqlDbType.VarChar, 8),
                new MySqlParameter("@_TheaterId", MySqlDbType.VarChar, 8)
            };
            parameters[0].Value     = pageindex;
            parameters[1].Value     = pagecount;
            parameters[2].Direction = ParameterDirection.Output;
            parameters[3].Value     = dailyplanid;
            parameters[4].Value     = theaterid;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_film_getFilmChoose", parameters, "getFilmChoose");

            totalpage = Int32.Parse(parameters[2].Value.ToString());
            return(ds);
        }
Example #15
0
        /// <summary>
        /// 获得日计划中的影厅信息
        /// </summary>
        /// <param name="dailyplanid">日计划ID</param>
        /// <param name="showplanname">放映计划名称</param>
        /// <returns></returns>
        public static DataSet GetHallByDailyPlan(string dailyplanid, string showplanname, int pageindex, int pagecount, out int totalpage)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_DailyPlanId",  MySqlDbType.VarChar,  8),
                new MySqlParameter("@_ShowPlanName", MySqlDbType.VarChar, 12),
                new MySqlParameter("pageindex",      MySqlDbType.Int32,    4),
                new MySqlParameter("pagecount",      MySqlDbType.Int32,    4),
                new MySqlParameter("totalpage",      MySqlDbType.Int32, 4)
            };
            parameters[0].Value     = dailyplanid;
            parameters[1].Value     = showplanname;
            parameters[2].Value     = pageindex;
            parameters[3].Value     = pagecount;
            parameters[4].Direction = ParameterDirection.Output;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_showplan_getHall", parameters, "GetHall");

            totalpage = Int32.Parse(parameters[4].Value.ToString());
            return(ds);
        }
Example #16
0
        /// <summary>
        /// 获得票券信息(优惠券/兑换券)
        /// </summary>
        /// <param name="voucherid">票券ID(编号)</param>
        /// <returns></returns>
        public static Flamingo.Entity.Para_Voucher GetVoucher(string voucherid)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_VoucherId", MySqlDbType.VarChar, 16),
                new MySqlParameter("@_HasUsed",   MySqlDbType.Bit)
            };
            parameters[0].Value     = voucherid;
            parameters[1].Direction = ParameterDirection.Output;
            DataTable dt = DbHelperMySQL.RunProcedure("proc_voucherbatch_getByVoucherId", parameters, "getByVoucherId").Tables[0];
            bool      tf = parameters[1].Value.ToString().Trim() == "1" ? true : false;

            Flamingo.Entity.Para_Voucher model = new Entity.Para_Voucher();

            if (dt.Rows.Count > 0)
            {
                model.VoucherBatchId   = dt.Rows[0]["VoucherBatchId"].ToString();
                model.VoucherId        = voucherid;
                model.VoucherName      = dt.Rows[0]["VoucherName"].ToString();
                model.VoucherTypeId    = Int32.Parse(dt.Rows[0]["VoucherTypeId"].ToString());
                model.VoucherType      = dt.Rows[0]["VoucherTypeName"].ToString();
                model.BeginDate        = DateTime.Parse(dt.Rows[0]["ReleaseDate"].ToString());
                model.EndDate          = DateTime.Parse(dt.Rows[0]["ExpireDate"].ToString());
                model.Price            = float.Parse(dt.Rows[0]["UnitPrice"].ToString());
                model.SerialScope      = dt.Rows[0]["SerialScope"].ToString();
                model.TemplateId       = 0;// Int32.Parse(dt.Rows[0]["TemplateId"].ToString());
                model.VoucherPrice     = float.Parse(dt.Rows[0]["VoucherPrice"].ToString());
                model.VoucherSubTypeId = Int32.Parse(dt.Rows[0]["VoucherSubTypeId"].ToString());
                model.VoucherSubType   = dt.Rows[0]["VoucherSubTypeName"].ToString();
                model.AllowUse         = true;
                model.ErrorMsg         = string.Empty;
                if (tf == true)
                {
                    model.AllowUse = false;
                    model.ErrorMsg = "票券已被使用";
                }
            }
            return(model);
        }
Example #17
0
        /// <summary>
        /// 获得场次
        /// </summary>
        /// <param name="dailyplanid">日计划ID</param>
        /// <param name="filmid">影片ID</param>
        /// <param name="hallid">影厅ID</param>
        /// <returns></returns>
        public static DataSet GetShowPlan(string dailyplanid, string filmid, string hallid, int pageindex, int pagecount, out int totalpage)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@dpid",     MySqlDbType.VarChar,   8),
                new MySqlParameter("@fid",      MySqlDbType.VarChar, 255),
                new MySqlParameter("@hid",      MySqlDbType.VarChar,   2),
                new MySqlParameter("pageindex", MySqlDbType.Int32,     4),
                new MySqlParameter("pagecount", MySqlDbType.Int32,     4),
                new MySqlParameter("totalpage", MySqlDbType.Int32, 4)
            };
            parameters[0].Value     = dailyplanid;
            parameters[1].Value     = filmid;
            parameters[2].Value     = hallid;
            parameters[3].Value     = pageindex;
            parameters[4].Value     = pagecount;
            parameters[5].Direction = ParameterDirection.Output;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_showplan_getShowPlan", parameters, "GetShowPlan");

            totalpage = Int32.Parse(parameters[5].Value.ToString());
            return(ds);
        }
Example #18
0
        /// <summary>
        /// 获得场次计划名称和影片ID 影厅ID 影厅名称 影院ID 影院名称 是否对号入座
        /// </summary>
        /// <param name="showplanid"></param>
        /// <returns></returns>
        public static string[] GetShowPlanName(string showplanid)
        {
            MySqlParameter[] parameters =
            {
                new MySqlParameter("@_showplanid", MySqlDbType.VarChar, 12)
            };
            parameters[0].Value = showplanid;
            DataSet ds = DbHelperMySQL.RunProcedure("proc_showplan_getShowPlanName", parameters, "getShowPlanName");

            string[] strs = new string[ds.Tables[ds.Tables.Count - 1].Columns.Count];
            if (ds != null)
            {
                DataTable dt = ds.Tables[ds.Tables.Count - 1];
                if (dt != null)
                {
                    if (ds.Tables[ds.Tables.Count - 1].Rows.Count == 1)
                    {
                        strs[0]  = dt.Rows[0]["ShowPlanName"].ToString();
                        strs[1]  = dt.Rows[0]["FilmId"].ToString();
                        strs[2]  = dt.Rows[0]["HallName"].ToString();
                        strs[3]  = dt.Rows[0]["HallId"].ToString();
                        strs[4]  = dt.Rows[0]["TheaterId"].ToString();
                        strs[5]  = dt.Rows[0]["TheaterName"].ToString();
                        strs[6]  = (bool)dt.Rows[0]["IsCheckingNumber"] == true ? "对号入座" : "非对号入座";
                        strs[7]  = dt.Rows[0]["ShowGroup"].ToString() == "" ? "false" : "true";
                        strs[8]  = dt.Rows[0]["ShowPlanIds"].ToString();
                        strs[9]  = dt.Rows[0]["FilmIds"].ToString();
                        strs[10] = dt.Rows[0]["ShowGroupShowPlanNames"].ToString();
                        strs[11] = dt.Rows[0]["LowestPrice"].ToString();
                        strs[12] = dt.Rows[0]["Position"].ToString();
                        strs[13] = dt.Rows[0]["StartTime"].ToString();
                    }
                }
            }
            return(strs);
        }
Example #19
0
        /// <summary>
        /// 获得代用券名称
        /// </summary>
        /// <returns></returns>
        public static DataTable GetVoucherSubstituteVoucherName()
        {
            DataSet ds = DbHelperMySQL.RunProcedure("proc_voucherbatch_getSubstitute", null, "getSubstitute");

            return(ds.Tables[0]);
        }
Example #20
0
        /// <summary>
        /// 获得备份设置信息
        /// </summary>
        /// <returns></returns>
        public static DataTable GetBackUpSetting()
        {
            DataTable dt = DbHelperMySQL.RunProcedure("proc_backupsetting_sel", null, "backupsetting_sel").Tables[0];

            return(dt);
        }
Example #21
0
 /// <summary>
 /// 获得影院信息
 /// </summary>
 /// <returns></returns>
 public static string GetTheater()
 {
     return(DbHelperMySQL.RunProcedure("proc_theater_sel", null, "theater_sel").Tables[0].Rows[0][0].ToString());
 }
Example #22
0
        /// <summary>
        /// 获得客户类型
        /// </summary>
        /// <returns></returns>
        public static DataTable GetCustomerType()
        {
            DataTable dt = DbHelperMySQL.RunProcedure("proc_customer_getCustomerType", null, "getCustomerType").Tables[0];

            return(dt);
        }