Beispiel #1
0
        public static string GetNewTransactionCode(string Query)
        {
            string  s2 = string.Empty;
            DataSet ds = ProjectFunctionsUtils.GetDataSet(Query);

            if (ds.Tables[0].Rows.Count > 0)
            {
                s2 = ds.Tables[0].Rows[0][0].ToString();
                s2 = (Convert.ToInt32(s2) + 1).ToString();
            }
            return(s2);
        }
Beispiel #2
0
        public static void SendMessage(string smsMessage, string SenderId, string MobileNos)
        {
            smsMessage.Replace('#', '_');

            //////////////-----   //http://msg.smscluster.com/rest/services/sendSMS/sendGroupSms?AUTH_KEY=YourAuthKey&message=message&senderId=dddddd&routeId=1&mobileNos=9999999999&smsContentType=english


            var uri = @"http://msg.smscluster.com/rest/services/sendSMS/sendGroupSms?AUTH_KEY=8ef012ac2bbcaaf804bd6e9c7a5712b&message=" + smsMessage + "&senderId=" + SenderId + "&routeId=1&mobileNos=" + MobileNos + "&smsContentType=english";

            var request = HttpWebRequest.Create(uri) as HttpWebRequest;

            try
            {
                //request.Method = "GET";
                //if (request.Method == "GET")
                //{
                //    var response = (HttpWebResponse)request.GetResponse();
                //    var receiveStream = response.GetResponseStream();

                //    var readStream = new StreamReader(receiveStream, Encoding.UTF8);
                //    if (readStream.ReadToEnd().ToString().Contains("3001"))
                //    {
                //        ProjectFunctionsUtils.SpeakError(smsMessage + "/ Message Send Successfully");

                //    }
                //    else
                //    {
                //ProjectFunctionsUtils.SpeakError(smsMessage + "/ Unable To Send Message");

                //    }
                //    response.Close();
                //    readStream.Close();
                //}

                ProjectFunctionsUtils.SpeakError("Unable To Send Message");
            }
            catch (Exception ex)
            {
                ProjectFunctionsUtils.SpeakError(ex.Message);
            }
            finally
            {
                request = null;
                GC.Collect();
            }
        }
Beispiel #3
0
        public static bool CheckAllPossible(string ArticleID, decimal MRP, string ColorID, string SizeID)
        {
            DataSet dsCheckART = ProjectFunctionsUtils.GetDataSet("select ARTSYSID,ARTMRP from ARTICLE where ARTSYSID='" + ArticleID + "' ");

            if (dsCheckART.Tables[0].Rows.Count > 0)
            {
                if (MRP == Convert.ToDecimal(dsCheckART.Tables[0].Rows[0]["ARTMRP"]))
                {
                }
                else
                {
                    ProjectFunctionsUtils.SpeakError("Wrong MRP Found");
                    return(false);
                }
            }
            else
            {
                ProjectFunctionsUtils.SpeakError("No Article Found");
                return(false);
            }

            DataSet dsCheckColor = ProjectFunctionsUtils.GetDataSet("select COLSYSID from COLOURS where COLSYSID='" + ColorID + "' ");

            if (dsCheckColor.Tables[0].Rows.Count > 0)
            {
            }
            else
            {
                ProjectFunctionsUtils.SpeakError("No Color Found");
                return(false);
            }
            DataSet dsCheckSize = ProjectFunctionsUtils.GetDataSet("select SZSYSID from SIZEMAST where SZSYSID='" + SizeID + "' ");

            if (dsCheckSize.Tables[0].Rows.Count > 0)
            {
            }
            else
            {
                ProjectFunctionsUtils.SpeakError("No Size Found");
                return(false);
            }
            return(true);
        }