Пример #1
0
        internal static FetchOutput FetchData(FetchInput input)
        {
            FetchOutput output = new FetchOutput()
            {
                Data = null
            };

            try
            {
                using (SqlConnection conn = new SqlConnection(input.ConnectionString))
                {
                    using (SqlCommand cmd = new SqlCommand(input.SqlCommand, conn))
                    {
                        cmd.CommandType = input.SqlCommandType;
                        foreach (string p in input.Parameters)
                        {
                            cmd.Parameters.Add(p);
                        }
                        conn.Open();
                        SqlDataAdapter da   = new SqlDataAdapter(cmd);
                        DataSet        data = new DataSet();
                        da.Fill(data);
                        output.Data = data;
                        conn.Close();
                    }
                }
            }
            catch (Exception ex)
            {
                output.ErrorMessage = ex.ToString();
            }
            return(output);
        }
Пример #2
0
 private void Start()
 {
     inputScript  = GetComponent <FetchInput> ();
     goAudio      = GetComponent <GameOverAudio> ();
     machineAudio = GetComponent <MachineAudio> ();
     gray         = GameObject.FindObjectOfType <Grayscale> ();
     gray.enabled = false;
 }
Пример #3
0
 void Start()
 {
     checkenemy   = GameObject.Find("RaycastPlayer").GetComponent <CheckEnemy> ();
     fetchinput   = GameObject.Find("Main Camera").GetComponent <FetchInput> ();
     col          = GameObject.Find("Collider").GetComponent <BoxCollider2D> ();
     swordphysics = GameObject.Find("Sword").GetComponent <SwordPhysics> ();
     damageText   = GameObject.Find("Main Camera").GetComponent <DamageTextEffect>();
     player       = GameObject.Find("Player").GetComponent <Transform> ();
 }
Пример #4
0
 void Start()
 {
     fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> ();
     sprite     = GetComponent <SpriteRenderer> ();
     if (fetchinput.getLastKey == FetchInput.KeyPressed.A)
     {
         transform.localScale = new Vector3(-transform.localScale.x, transform.localScale.y, transform.localScale.z);
         direction            = "left";
     }
     else
     {
         direction = "right";
     }
     StartCoroutine(SlashEffect());
 }
Пример #5
0
        public static List <CustomerModel> GetCustomer(string parameter = null)
        {
            FetchInput input = new FetchInput();

            if (parameter != null)
            {
                return new List <CustomerModel>()
                       {
                           MockServices.ReturnMappedCustomerData_Mock(parameter)
                       }
            }
            ;
            else
            {
                return(MockServices.ReturnMappedCustomerData_Mock());
            }
        }
Пример #6
0
        internal static List <CustomerModel> ReturnMappedCustomerData(FetchInput input)
        {
            List <CustomerModel> CustomerData = new List <CustomerModel>();

            try
            {
                DataSet data = FetchData(input).Data;
                if (data.Tables[0].Columns.Count > 0)
                {
                    for (int i = 0; i < data.Tables[0].Rows.Count; i++)
                    {
                        CustomerData.Add(new CustomerModel()
                        {
                        });
                    }
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.ToString());
            }
            return(CustomerData);
        }
Пример #7
0
 void Start()
 {
     input = Camera.main.GetComponent <FetchInput> ();
 }
Пример #8
0
 void Start()
 {
     fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> ();
 }
 void Start()
 {
     fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> ();
     getScale   = transform.localScale.x;
 }
Пример #10
0
 void Start()
 {
     rb           = GetComponent <Rigidbody2D> ();
     fetchinput   = GameObject.Find("Main Camera").GetComponent <FetchInput> ();
     swordphysics = GameObject.Find("Sword").GetComponent <SwordPhysics> ();
 }