示例#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);
            }
        }
        public static DataTable GetContactStudentByOstad(string stCode)
        {
            DataTable dtst = ContactDAO.SelectContactAStudent(stCode);

            dt = ContactBuisnes.GetConatctOstads(stCode);

            return(Functions.AddStudentByOstadDt.GetOstadAddStudent(dtst, dt));
        }
示例#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);
            }
        }
示例#4
0
        public static void SendSmsStudentForRejectTechnichal(string stCode)
        {
            DataTable dt = ContactBuisnes.GetContactAStudent(stCode);

            if (dt != null && dt.Rows.Count > 0)
            {
                string msg = TextLogSms.GetTextSmsStudentForRejectTechnichal();
                SendSmsSt(dt, msg);
            }
        }
示例#5
0
        public static void SendSmsStudent(string osName, string typeOs, string stCode)
        {
            DataTable dt = ContactBuisnes.GetContactAStudent(stCode);

            if (dt != null && dt.Rows.Count > 0)
            {
                string msg = TextLogSms.GetTextSmsForRejectDefenceSt(osName, typeOs);
                SendSmsSt(dt, msg);
            }
        }
        public static string FullNameSt(string stCode)
        {
            DataTable dtSt       = ContactBuisnes.GetContactAStudent(stCode);
            string    fullNameSt = "";

            if (dtSt != null && dtSt.Rows.Count > 0)
            {
                fullNameSt = dtSt.Rows[0]["FullName"].ToString();
            }
            return(fullNameSt);
        }
示例#7
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);
            }
        }
示例#8
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);
        }