Beispiel #1
0
        public static string RegWSmojaz(int?reqid = 0, double epayid = 0)
        {
            string alert = "";

            ClEpayOrder cl = new ClEpayOrder();

            cl.EpayOrderID = Convert.ToInt32(epayid);
            DataSet ds      = EpayOrderClass.GetList(cl);
            string  groupid = ds.Tables[0].Rows[0]["GroupID"].ToString();

            if (groupid != "")
            {
                ClEpayGroup cl2 = new ClEpayGroup();
                cl2.GroupID = Convert.ToInt32(groupid);
                DataSet ds2 = EpayGroupClass.GetList(cl2);
                for (int i = 0; i <= ds2.Tables[0].Rows.Count - 1; i++)
                {
                    alert += RegWSmojazOneReq(Convert.ToInt32(ds2.Tables[0].Rows[i]["ReqID"].ToString()), epayid);
                }
                ds2.Dispose();
            }
            else
            {
                alert = RegWSmojazOneReq(reqid, epayid);
            }

            ds.Dispose();

            return(alert);
        }
Beispiel #2
0
        private int GetGroupID(string AllRequest)
        {
            ClEpayGroup cl = new ClEpayGroup();

            cl.AllReq     = AllRequest;
            cl.PersonalID = Convert.ToInt32(lblPersonID.Text);
            int i = EpayGroupClass.insertAllReq(cl);

            if (i == 0)
            {
                TerraficPlanBLL.Utility.ShowMsg(Page, ProPertyData.MsgType.warning, "خطا در ثبت");
            }

            return(i);
        }
Beispiel #3
0
        //---------------------------------------------------------------------------------------------------------
        public static DataSet GetList(ClEpayGroup c)
        {
            SqlCommand cmd = new SqlCommand("PRC_EpayGroup_GetList", cnn);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("UserIDLog", SqlDbType.NVarChar)).Value = CSharp.PublicFunction.GetUserID();
            cmd.Parameters.Add(new SqlParameter("IpLog", SqlDbType.NVarChar)).Value     = CSharp.PublicFunction.GetIPAddress();
            cmd.Parameters.Add(new SqlParameter("OSLog", SqlDbType.NVarChar)).Value     = CSharp.PublicFunction.GetOS();
            cmd.Parameters.Add(new SqlParameter("OSVerLog", SqlDbType.NVarChar)).Value  = CSharp.PublicFunction.GetBrowser() + CSharp.PublicFunction.GetBrowserVersion();
            cmd.Parameters.Add(new SqlParameter("URLLog", SqlDbType.NVarChar)).Value    = CSharp.PublicFunction.GetURL();

            cmd.Parameters.Add(new SqlParameter("EpayGroupID", SqlDbType.Int)).Value  = Securenamespace.SecureData.CheckSecurity(c.EpayGroupID);
            cmd.Parameters.Add(new SqlParameter("GroupID", SqlDbType.Int)).Value      = Securenamespace.SecureData.CheckSecurity(c.GroupID);
            cmd.Parameters.Add(new SqlParameter("ReqID", SqlDbType.Int)).Value        = Securenamespace.SecureData.CheckSecurity(c.ReqID);
            cmd.Parameters.Add(new SqlParameter("DareReg", SqlDbType.NVarChar)).Value = Securenamespace.SecureData.CheckSecurity(c.DareReg);
            cmd.Parameters.Add(new SqlParameter("PersonalID", SqlDbType.Int)).Value   = Securenamespace.SecureData.CheckSecurity(c.PersonalID);


            SqlParameter prmResult = new SqlParameter("Result", SqlDbType.Int);

            prmResult.Direction = ParameterDirection.Output;
            cmd.Parameters.Add(prmResult);
            DataSet        ds = new DataSet();
            SqlDataAdapter da = new SqlDataAdapter(cmd);

            try
            {
                cnn.Open();
                da.Fill(ds);
                return(ds);
            }
            catch (Exception ex)
            {
                return(null);
            }
            finally
            {
                cnn.Close();
            }
        }
Beispiel #4
0
        public static int insertAllReq(ClEpayGroup c)

        {
            SqlCommand cmd = new SqlCommand("PRC_EpayGroup_InsertAllREq", cnn);

            cmd.CommandType = System.Data.CommandType.StoredProcedure;

            cmd.Parameters.Add(new SqlParameter("UserIDLog", SqlDbType.NVarChar)).Value = CSharp.PublicFunction.GetUserID();
            cmd.Parameters.Add(new SqlParameter("IpLog", SqlDbType.NVarChar)).Value     = CSharp.PublicFunction.GetIPAddress();
            cmd.Parameters.Add(new SqlParameter("OSLog", SqlDbType.NVarChar)).Value     = CSharp.PublicFunction.GetOS();
            cmd.Parameters.Add(new SqlParameter("OSVerLog", SqlDbType.NVarChar)).Value  = CSharp.PublicFunction.GetBrowser() + CSharp.PublicFunction.GetBrowserVersion();
            cmd.Parameters.Add(new SqlParameter("URLLog", SqlDbType.NVarChar)).Value    = CSharp.PublicFunction.GetURL();


            cmd.Parameters.Add(new SqlParameter("GroupID", SqlDbType.Int)).Value      = Securenamespace.SecureData.CheckSecurity(c.GroupID);
            cmd.Parameters.Add(new SqlParameter("ReqID", SqlDbType.Int)).Value        = Securenamespace.SecureData.CheckSecurity(c.ReqID);
            cmd.Parameters.Add(new SqlParameter("DareReg", SqlDbType.NVarChar)).Value = Securenamespace.SecureData.CheckSecurity(c.DareReg);
            cmd.Parameters.Add(new SqlParameter("PersonalID", SqlDbType.Int)).Value   = Securenamespace.SecureData.CheckSecurity(c.PersonalID);
            cmd.Parameters.Add(new SqlParameter("AllReq", SqlDbType.NVarChar)).Value  = Securenamespace.SecureData.CheckSecurity(c.AllReq);


            SqlParameter prmResult = new SqlParameter("Result", SqlDbType.Int);

            prmResult.Direction = ParameterDirection.Output;
            cmd.Parameters.Add(prmResult);
            try
            {
                cnn.Open();
                cmd.ExecuteNonQuery();
                return(Convert.ToInt32(prmResult.Value));
            }
            catch (Exception ex)
            {
                return(0);
            }
            finally
            {
                cnn.Close();
            }
        }