예제 #1
0
        public ActionResult FundTransferAction(FundTransferModel ft )
        {
            FundTransferBal bal = new FundTransferBal();
            bal.Fund = ft.Fund;
            bal.Loginid2 = ft.Loginid2;
            bal.UserId = Convert.ToInt32(Session["loginid"]);

            return View();
        }
예제 #2
0
        public bool FTmethod(FundTransferBal bal)
        {
            bool          status = false;
            SqlConnection cn     = new SqlConnection(ConfigurationManager.ConnectionStrings["ZigmaCS"].ToString());

            try
            {
                //First Table
                SqlCommand cmd = new SqlCommand("-", cn);
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Parameters.AddWithValue("@LoginId", bal.UserId);
                cmd.Parameters.AddWithValue("@LoginPass", bal.Password);
                //Second Table
                cn.Open();
                SqlDataReader dr = cmd.ExecuteReader();

                if (dr.HasRows)
                {
                    status = true;
                }
                else
                {
                    status = false;
                }
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
            finally
            {
                cn.Close();
                cn.Dispose();
            }
            return(status);
        }