Beispiel #1
0
        private void Loadata(int CustomerID)
        {
            defaultAvatar = Comon.Global.sys_DefaultAvatar;
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Customer_LoadInfo]", CommandType.StoredProcedure,
                                            "@CurrentID", SqlDbType.Int, Convert.ToInt32(CustomerID == 0 ? 0 : CustomerID));
            }
            if (ds != null)
            {
                CustName        = ds.Tables["Table"].Rows[0]["Name"].ToString();
                CustCode        = ds.Tables["Table"].Rows[0]["Cust_Code"].ToString();
                Phone           = ds.Tables["Table"].Rows[0]["Phone1"].ToString();
                Avatar          = ds.Tables["Table"].Rows[0]["Avatar"].ToString();
                facebookurl     = ds.Tables["Table"].Rows[0]["facebookurl"].ToString();
                instgramurl     = ds.Tables["Table"].Rows[0]["instgramurl"].ToString();
                totalmoneyRaise = ds.Tables["Table"].Rows[0]["TOTALPRICE"].ToString();
                totalmoneyPaid  = ds.Tables["Table"].Rows[0]["TOTALPAID"].ToString();
                totalmoneyLeft  = ds.Tables["Table"].Rows[0]["Rest"].ToString();
            }
            else
            {
                CustName        = "";
                CustCode        = "";
                Phone           = ""; Avatar = ""; instgramurl = ""; facebookurl = "";
                totalmoneyRaise = ""; totalmoneyPaid = ""; totalmoneyLeft = "";
            }
        }
Beispiel #2
0
        public static string LoadData(string dateFrom, string dateTo, string branchID)
        {
            //Ke toan   STT,ReceiptName,Amount,Date,CreatedName
            //import  STT,Date,CreatedName,Amount
            //payment  STT,CustomerName,Date,Amount,CreatedName,SourceName
            // Total ketoan, toal import, toal payment, totalmain
            DataSet ds = new DataSet();

            //DataTable dt = new DataTable();
            //dt.Columns.Add("Month"); dt.Columns.Add("Amount"); dt.Columns.Add("Target"); dt.Columns.Add("UpDown");
            //DataRow dr = dt.NewRow();
            //dr[0] = "06-2019"; dr[1] = "4000000"; dr[2] = "06-2019"; dr[3] = "<a class='ui blue mini basic label'>Up</a>";
            //DataRow dr1 = dt.NewRow();
            //dr1[0] = "07-2019"; dr1[1] = "7000000"; dr1[2] = "07-2019"; dr1[3] = "<a class='ui red mini basic label'>Down</a>";
            //dt.Rows.Add(dr); dt.Rows.Add(dr1);
            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Report_Overview]", CommandType.StoredProcedure,
                                            "@dateFrom", SqlDbType.DateTime, Convert.ToDateTime(dateFrom)
                                            , "@dateTo", SqlDbType.DateTime, Convert.ToDateTime(dateTo)
                                            , "@branchID", SqlDbType.Int, Convert.ToInt32(branchID));
            }
            if (ds != null)
            {
                return(JsonConvert.SerializeObject(ds, Formatting.Indented));
            }
            else
            {
                return("");
            }
        }
        private void InitializeService()
        {
            _Service     = new List <DiscountTable>();
            _ServiceType = new List <DiscountTable>();
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Discount_LoadListService]", CommandType.StoredProcedure);
            }
            if (ds != null)
            {
                DataTable dtService     = ds.Tables[0];
                DataTable dtServiceType = ds.Tables[1];
                foreach (DataRow dr in dtService.Rows)
                {
                    _Service.Add(new DiscountTable(dr[0].ToString(), dr[1].ToString()));
                }
                foreach (DataRow dr in dtServiceType.Rows)
                {
                    _ServiceType.Add(new DiscountTable(dr[0].ToString(), dr[1].ToString()));
                }
            }
            else
            {
                _Service     = null;
                _ServiceType = null;
            }
        }
Beispiel #4
0
        private void Loadata(int id)
        {
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Product_Reciept_LoadDetail]", CommandType.StoredProcedure,
                                            "@ID", SqlDbType.Int, Convert.ToInt32(id == 0 ? 0 : id));
            }
            if (ds.Tables[1] != null && ds.Tables[1].Rows.Count > 0)
            {
                _DataProductChoosen = JsonConvert.SerializeObject(ds.Tables[1]);
            }
            else
            {
                _DataProductChoosen = null;
            }
            if (ds.Tables[0] != null && ds.Tables[0].Rows.Count > 0)
            {
                _DataInputMain = JsonConvert.SerializeObject(ds.Tables[0]);
            }
            else
            {
                _DataInputMain = "";
            }
        }
        public static string LoadataCustomer(string dateFrom, string dateTo)
        {
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Customer_LoadList]", CommandType.StoredProcedure,
                                            "@dateFrom", SqlDbType.DateTime, Convert.ToDateTime(dateFrom)
                                            , "@dateTo", SqlDbType.DateTime, Convert.ToDateTime(dateTo));
            }
            return(JsonConvert.SerializeObject(ds));
        }
Beispiel #6
0
        public static string LoadataReceipt(string dateFrom, string dateTo)
        {
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Accountant_ReceiptPaymentLoad]", CommandType.StoredProcedure,
                                            "@dateFrom", SqlDbType.DateTime, Convert.ToDateTime(dateFrom)
                                            , "@dateTo", SqlDbType.DateTime, Convert.ToDateTime(dateTo));
            }
            return(JsonConvert.SerializeObject(ds));
        }
Beispiel #7
0
 public string LoadDataMovie()
 {
     try
     {
         string  Page = HttpContext.Request.Query["Page"].ToString();
         DataSet dt   = new DataSet();
         using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
         {
             dt = confunc.ExecuteDataSet("[YYY_sp_Client_Movie_LoadList_Catalog]", CommandType.StoredProcedure,
                                         "@PageNumber", SqlDbType.Int, Page);
         }
         return(dt != null?JsonConvert.SerializeObject(dt) : "[]");
     }
     catch (Exception ex)
     {
         return("[]");
     }
 }
Beispiel #8
0
        private void Initialize()
        {
            _DataBranch  = "";
            _DataCompany = "";
            _DataOption  = "";
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase connFunc = new Models.ExecuteDataBase())
            {
                ds = connFunc.ExecuteDataSet("[YYY_sp_LoadAll_Setting]", CommandType.StoredProcedure);
            }
            _Branch_ID = ds.Tables[1].Rows[0]["ID"].ToString();
            _CompanyID = ds.Tables[0].Rows[0]["ID"].ToString();

            _DataBranch  = JsonConvert.SerializeObject(ds.Tables[1]);
            _DataCompany = JsonConvert.SerializeObject(ds.Tables[0]);
            _DataOption  = JsonConvert.SerializeObject(ds.Tables[2]);
        }
Beispiel #9
0
        public string Loadata(int CustomerID)
        {
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_CustomerCare_GetInfo]", CommandType.StoredProcedure,
                                            "@Customer_ID", SqlDbType.Int, Convert.ToInt32(CustomerID == 0 ? 0 : CustomerID));
            }
            if (ds != null)
            {
                return(JsonConvert.SerializeObject(ds, Formatting.Indented));
            }
            else
            {
                return("");
            }
        }
Beispiel #10
0
        private void Loadata(int CustomerID)
        {
            DataSet ds = new DataSet();

            using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
            {
                ds = confunc.ExecuteDataSet("[YYY_sp_Customer_LoadInfo]", CommandType.StoredProcedure,
                                            "@CurrentID", SqlDbType.Int, Convert.ToInt32(CustomerID == 0 ? 0 : CustomerID));
            }
            if (ds != null)
            {
                dataMainCustomer = JsonConvert.SerializeObject(ds.Tables["Table"], Formatting.Indented);
                dataSchedule     = JsonConvert.SerializeObject(ds.Tables["Table3"], Formatting.Indented);
                dataHistory      = JsonConvert.SerializeObject(ds.Tables["Table1"], Formatting.Indented);
            }
            else
            {
                dataMainCustomer = "";
                dataSchedule     = "";
                dataHistory      = "";
            }
        }
Beispiel #11
0
 DataSet LoadDataProduct()
 {
     try
     {
         DataSet ds = new DataSet();
         using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
         {
             ds = confunc.ExecuteDataSet("[YYY_sp_Client_Product_LoadList]", CommandType.StoredProcedure);
         }
         if (ds != null)
         {
             return(ds);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Beispiel #12
0
        public string LoadDataMain()
        {
            try
            {
                DataSet ds = new DataSet();

                using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
                {
                    ds = confunc.ExecuteDataSet("[YYY_sp_Client_Movie_LoadList_Main]", CommandType.StoredProcedure);
                }
                if (ds != null)
                {
                    return(JsonConvert.SerializeObject(ds));
                }
                else
                {
                    return("[]");
                }
            }
            catch (Exception ex)
            {
                return("[]");
            }
        }
Beispiel #13
0
 DataSet DataRoomChair(int RoomID)
 {
     try
     {
         DataSet dt = new DataSet();
         using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
         {
             dt = confunc.ExecuteDataSet("[YYY_sp_Cinema_Chair_LoadDetail]", CommandType.StoredProcedure,
                                         "@RoomID", SqlDbType.Int, RoomID);
         }
         if (dt != null)
         {
             return(dt);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }
Beispiel #14
0
 public string GetMovieDetail(int MovieDetailID)
 {
     try
     {
         DataSet ds = new DataSet();
         using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
         {
             ds = confunc.ExecuteDataSet("[YYY_sp_Client_Movie_LoadDetail]", CommandType.StoredProcedure,
                                         "@CurrentID", SqlDbType.Int, MovieDetailID);
         }
         if (ds != null)
         {
             return(JsonConvert.SerializeObject(ds));
         }
         else
         {
             return("");
         }
     }
     catch (Exception ex)
     {
         return("[]");
     }
 }
Beispiel #15
0
        public string LoadUser()
        {
            try
            {
                DataSet dt = new DataSet();

                using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
                {
                    dt = confunc.ExecuteDataSet("[YYY_sp_Employee_LoadList]", CommandType.StoredProcedure);
                }
                if (dt != null)
                {
                    return(JsonConvert.SerializeObject(dt));
                }
                else
                {
                    return("[]");
                }
            }
            catch (Exception ex)
            {
                return("[]");
            }
        }
Beispiel #16
0
 DataSet LoadDetail(int ScheduleID)
 {
     try
     {
         DataSet ds = new DataSet();
         using (Models.ExecuteDataBase confunc = new Models.ExecuteDataBase())
         {
             ds = confunc.ExecuteDataSet("[YYY_sp_Client_Schedule_LoadMovie]", CommandType.StoredProcedure,
                                         "@ScheduleID", SqlDbType.Int, ScheduleID);
         }
         if (ds != null)
         {
             return(ds);
         }
         else
         {
             return(null);
         }
     }
     catch (Exception ex)
     {
         return(null);
     }
 }