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); }
private void Start() { inputScript = GetComponent <FetchInput> (); goAudio = GetComponent <GameOverAudio> (); machineAudio = GetComponent <MachineAudio> (); gray = GameObject.FindObjectOfType <Grayscale> (); gray.enabled = false; }
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> (); }
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()); }
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()); } }
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); }
void Start() { input = Camera.main.GetComponent <FetchInput> (); }
void Start() { fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> (); }
void Start() { fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> (); getScale = transform.localScale.x; }
void Start() { rb = GetComponent <Rigidbody2D> (); fetchinput = GameObject.Find("Main Camera").GetComponent <FetchInput> (); swordphysics = GameObject.Find("Sword").GetComponent <SwordPhysics> (); }