Exemplo n.º 1
0
        public static void SendSmsOsForOstadsDefence(string stcode, string stName,
                                                     string dateStart, string dateEnd, string startTime, string endTime, bool edit = false)
        {
            DataTable dt;

            if (stcode == "99900999")
            {
                dt = new DataTable();
                dt.Columns.Add("mobileOs");
                DataRow dr = dt.NewRow();
                dr["mobileOs"] = "09192678116";
                dt.Rows.Add(dr);
            }
            else
            {
                dt = ContactBuisnes.GetConatctOstads(stcode);
            }
            if (dt != null && dt.Rows.Count > 0)
            {
                string msg = "";
                if (!edit)
                {
                    msg = TextLogSms.GetTextSmsForAcceptedCommitmentDefencceOs(stName, dateStart, startTime, dateEnd.Substring(0, 10), endTime);
                }
                else
                {
                    msg = TextLogSms.GetEditTextSmsForAcceptedCommitmentDefencceOs(stName, dateStart, startTime, dateEnd.Substring(0, 10), endTime);
                }

                SendSmsOS(dt, msg);
            }
        }
Exemplo n.º 2
0
        public static DataTable GetContactStudentByOstad(string stCode)
        {
            DataTable dtst = ContactDAO.SelectContactAStudent(stCode);

            dt = ContactBuisnes.GetConatctOstads(stCode);

            return(Functions.AddStudentByOstadDt.GetOstadAddStudent(dtst, dt));
        }
Exemplo n.º 3
0
        public static void SendSmsOstadForRejectTechnichal(string stCode, string stName)
        {
            DataTable dt  = ContactBuisnes.GetConatctOstads(stCode);
            string    msg = TextLogSms.GetTextSmsOstadForRejectTechnichal(stName);

            if (dt != null && dt.Rows.Count > 0)
            {
                SendSmsOS(dt, msg);
            }
        }
Exemplo n.º 4
0
        public static void SendSmsSchedular()
        {
            DataTable dtLogSms = GetlogsNotSendSms();
            const int Approved = 1;
            DataTable dtOs;

            foreach (DataRow dtRow in dtLogSms.Rows)
            {
                dtOs = ContactBuisnes.GetConatctOstads(dtRow["ID_Group"].ToString());
                string textMsg = TextLogSms.GetTextLogSms(dtRow["ID_Group"].ToString(),
                                                          dtRow["FullName"].ToString());

                SendSmsOS(dtOs, textMsg);
                UpdateWaitingSendSms(dtRow["ID_Group"].ToString(), Approved);
            }
        }
Exemplo n.º 5
0
        public static DataTable InsertSendSms(string idGrp)
        {
            DataTable DtInsert = null;

            if (idGrp != "" && idGrp != null && !(CheckSendedSmsToday(idGrp)))
            {
                DataTable dtOs;
                dtOs = ContactBuisnes.GetConatctOstads(idGrp);
                if (dtOs != null && dtOs.Rows.Count > 0)
                {
                    string persianDate = DatePersian.GetDateNow();
                    string Time        = DatePersian.GetTimeNow12();
                    string fullNameSt  = ContactBuisnes.FullNameSt(idGrp);
                    string textMsg     = TextLogSms.GetTextLogSms(fullNameSt, idGrp);
                    DtInsert = SendSmsContactDAO.InsertLogSms(fullNameSt, idGrp, persianDate,
                                                              Time, textMsg, CheckTimeSendSms());
                    if (CheckTimeSendSms())
                    {
                        SendSmsOS(dtOs, textMsg);
                    }
                }
            }
            return(DtInsert);
        }