Ejemplo n.º 1
0
        public string SaveTSMailService(TSMsilServiceType.TSMailServiceDataType _SaveData)
        {
            MySqlCommand oSqlCommand = new MySqlCommand();
            string       sqlQuery    = "Insert Into tblservicetimer ("
                                       + "TimerID,"
                                       + "Occurence,"
                                       + "TriggerDate,"
                                       + "TriggerTime,"
                                       + "NofTime,"
                                       + "CurrentCount,"
                                       + "TriggerStatus,"
                                       // + "SQLStatement,"
                                       + "WhereC0ndition,"
                                       + "SearchText,"
                                       + "SearchValue,"
                                       + "CustomerID,MailListID,MailSubject,BoadyHeader,MailCategory)"
                                       + " Values ("
                                       + "@TimerID,"
                                       + "@Occurence,"
                                       + "@TriggerDate,"
                                       + "@TriggerTime,"
                                       + "@NofTime,"
                                       + "@CurrentCount,"
                                       + "@TriggerStatus,"
                                       //  + "@SQLStatement,"
                                       + "@WhereC0ndition,"
                                       + "@SearchText,"
                                       + "@SearchValue,"
                                       + "@CustomerID,@MailListID,@MailSubject,@BoadyHeader,@MailCategory)";

            try
            {
                oSqlCommand.Parameters.AddWithValue("@TimerID", _SaveData.TimerID);
                oSqlCommand.Parameters.AddWithValue("@Occurence", _SaveData.Occurence);
                oSqlCommand.Parameters.AddWithValue("@TriggerDate", _SaveData.TriggerDate);
                oSqlCommand.Parameters.AddWithValue("@TriggerTime", _SaveData.TriggerTime);
                oSqlCommand.Parameters.AddWithValue("@NofTime", _SaveData.NofTime);
                oSqlCommand.Parameters.AddWithValue("@CurrentCount", _SaveData.CurrentCount);
                oSqlCommand.Parameters.AddWithValue("@TriggerStatus", _SaveData.TriggerStatus);
                //   oSqlCommand.Parameters.AddWithValue("@SQLStatement", _SaveData.SQLStatement);
                oSqlCommand.Parameters.AddWithValue("@WhereC0ndition", _SaveData.WhereC0ndition);
                oSqlCommand.Parameters.AddWithValue("@SearchText", _SaveData.SearchText);
                oSqlCommand.Parameters.AddWithValue("@SearchValue", _SaveData.SearchValue);
                oSqlCommand.Parameters.AddWithValue("@CustomerID", _SaveData.CustomerID);
                oSqlCommand.Parameters.AddWithValue("@MailListID", _SaveData.MailListID);
                //MailSubject,BoadyHeader,MailCategory
                oSqlCommand.Parameters.AddWithValue("@MailSubject", _SaveData.MailSubject);
                oSqlCommand.Parameters.AddWithValue("@BoadyHeader", _SaveData.BoadyHeader);
                oSqlCommand.Parameters.AddWithValue("@MailCategory", _SaveData.MailCategory);

                string respond = Mycommon.ExicuteAnyCommand(sqlQuery, oSqlCommand, null, "Save TSMailService");
                return(respond);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Ejemplo n.º 2
0
        public string  SaveEssencialDecission(EmailInforType.EssencialDecissionType _SaveData)
        {
            MySqlCommand oSqlCommand = new MySqlCommand();
            string       sqlQuery    = "Insert Into ecoessencialdecission ("
                                       + "SysID,"
                                       + "Department,"
                                       + "FirstPerson,"
                                       + "FirstEmail,"
                                       + "SecondPeson,"
                                       + "SeconfEmail,"
                                       + "Status)"
                                       + " Values ("
                                       + "@SysID,"
                                       + "@Department,"
                                       + "@FirstPerson,"
                                       + "@FirstEmail,"
                                       + "@SecondPeson,"
                                       + "@SeconfEmail,"
                                       + "@Status)";

            try
            {
                oSqlCommand.Parameters.AddWithValue("@SysID", _SaveData.SysID);
                oSqlCommand.Parameters.AddWithValue("@Department", _SaveData.Department);
                oSqlCommand.Parameters.AddWithValue("@FirstPerson", _SaveData.FirstPerson);
                oSqlCommand.Parameters.AddWithValue("@FirstEmail", _SaveData.FirstEmail);
                oSqlCommand.Parameters.AddWithValue("@SeconfEmail", _SaveData.SecondEmail);
                oSqlCommand.Parameters.AddWithValue("@SecondPeson", _SaveData.SecondPeson);
                oSqlCommand.Parameters.AddWithValue("@Status", _SaveData.Status);
                string respond = Mycommon.ExicuteAnyCommand(sqlQuery, oSqlCommand, null, "SAve ECO Email");
                return(respond);
            }
            catch (Exception ex)
            {
                return(ex.Message);
            }
        }
Ejemplo n.º 3
0
 public string UpdateUserMapping(int UID, string EmpId)
 {
     try
     {
         string sqlEmployee = "update  tblemployee set userID=" + UID + " where EmpNo='" + EmpId + "'";
         string respond     = MYCommon.ExicuteAnyCommand(sqlEmployee, "UpdateEmpNumber");
         return(respond);
     }
     catch (Exception ex)
     {
         return(ex.Message);
     }
 }