Esempio n. 1
0
 public int svcExecuteReturnNonQuery(string spName, clsSqlParameterContract objSParam)
 {
     try
     {
         if (EntsvcExecuteReturnNonQuery != null)
         {
             return(EntsvcExecuteReturnNonQuery(spName, objSParam));
         }
         else
         {
             return(-1);
         }
     }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "svcExecuteReturnNonQuery()--:--clsHttpAudio.cs--:--" + ex.Message + " :--:--");
         //ClsException.LogError(ex);
         //ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return(0);
     }
 }
 public int svcExecuteReturnNonQuery(string spName, clsSqlParameterContract objSParam)
 {
     if(EntsvcExecuteReturnNonQuery!=null)
     {
         return (EntsvcExecuteReturnNonQuery(spName, objSParam));
     }
     else
     {
         return -1;
     }
 }
 public void svcExecuteNonQuery(string spName, clsSqlParameterContract objSParam)
 {
     if (EntsvcExecuteNonQuery != null)
     {
         EntsvcExecuteNonQuery(spName, objSParam);
     }                
 }
 public clsDataBaseInfo svcExecuteDataSet(string spName, clsSqlParameterContract objSParam)
 {
     if (EntsvcExecuteStoredProcedure != null)
     {
         return (EntsvcExecuteStoredProcedure(spName, objSParam));
     }
     else
     {
         return null;
     }
 }
Esempio n. 5
0
        // Sending the Email notification not sent(txn)
        public string getEmailStatus(IDbTransaction txn)
        {
            try
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    List<clsSqlParametersInfo> lstParamInfo = new List<clsSqlParametersInfo>();
                    clsSqlParameterContract clsDataContract = new clsSqlParameterContract();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pEmailStatus";
                    objInfo.PDBType = "NVarChar";
                    objInfo.PValue = _ID;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo);

                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pConfId";
                    objInfo1.PDBType = "BigInt";
                    objInfo1.PValue = _ConferenceID;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo1);

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pUserName";
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PValue = _GuestName;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo2);

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pEmail";
                    objInfo3.PDBType = "NVarChar";
                    objInfo3.PValue = _Email;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo3);

                    clsDataContract.objParam = lstParamInfo;

                   clsMailDBClient.chHttpMailDBService.svcExecuteNonQuery("spEmailSentNotSent", clsDataContract);

                   return (string)(objInfo.PValue);

                }
                else
                {

                    return (new Calender.DataAccess.ClsCalenderDataService(txn).Calender_Email(_EmailStatus, _ConferenceID, _GuestName, _Email));
                }
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "getEmailStatus()", "ClsCalender.xaml.cs");
                return string.Empty;
            }
        } 
Esempio n. 6
0
        //Saving the guest transaction(txn)
        public int SaveGuest(IDbTransaction txn)
        {
            try
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {

                    StringBuilder sb = new StringBuilder();
                    sb.AppendLine("calander Module.");
                    sb.AppendLine("Saving the guest transaction:");
                    sb.Append(sb1.ToString());
                    VMuktiAPI.ClsLogging.WriteToTresslog(sb);

                    List<clsSqlParametersInfo> lstParamInfo = new List<clsSqlParametersInfo>();
                    clsSqlParameterContract clsDataContract = new clsSqlParameterContract();

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PDBType = "BigInt";
                    objInfo.PValue = -1;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo);

                    clsSqlParametersInfo objConfID = new clsSqlParametersInfo();
                    objConfID.Direction = "Input";
                    objConfID.PName = "@pConfId";
                    objConfID.PDBType = "BigInt";
                    objConfID.PValue = ID;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objConfID);

                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pUserName";
                    objInfo1.PDBType = "NVarChar";
                    objInfo1.PValue = GuestName;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo1);

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pEmail";
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PValue = Email;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo2);

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pCreatedDate";
                    objInfo3.PDBType = "DateTime";
                    objInfo3.PValue = DateTime.Now;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo3);

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pCreatedBy";
                    objInfo4.PDBType = "BigInt";
                    objInfo4.PValue = CreatedBy;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo4);

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pModifiedDate";
                    objInfo5.PDBType = "DateTime";
                    objInfo5.PValue = DateTime.Now;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo5);

                    clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pModifiedBy";
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PValue = ModifiedBy;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo6);

                    clsDataContract.objParam = lstParamInfo;

                   return clsMailDBClient.chHttpMailDBService.svcExecuteReturnNonQuery("sptblConferenceGuests", clsDataContract);



                }
                else
                {

                    return (new Calender.DataAccess.ClsCalenderDataService(txn).Calender_ConferenceGuestsSave(_ID, _GuestName, _Email, _CreatedDate, _CreatedBy, _ModifiedDate, _ModifiedBy));
                }
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "SaveGuest()", "ClsCalender.xaml.cs");
                return -1;
            }
        }
Esempio n. 7
0
        public int Save(IDbTransaction txn)
        {
            try
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    List<clsSqlParametersInfo> lstParamInfo = new List<clsSqlParametersInfo>();
                    clsSqlParameterContract clsDataContract = new clsSqlParameterContract();

                    clsSqlParametersInfo objPID = new clsSqlParametersInfo();
                    objPID.Direction = "Input";
                    objPID.PName = "@pID";
                    objPID.PDBType = "BigInt";
                    objPID.PValue = ID;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objPID);

                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Output";
                    objInfo.PName = "@pReturnMaxId";
                    objInfo.PDBType = "BigInt";
                   // objInfo.PValue = ID;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo);


                    clsSqlParametersInfo objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pConfTitle";
                    objInfo1.PDBType = "NVarChar";
                    objInfo1.PValue = _ConfTitle;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo1);

                    clsSqlParametersInfo objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pStartDateTime";
                    objInfo2.PDBType = "DateTime";
                    objInfo2.PValue = _StartDateTime;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo2);

                    clsSqlParametersInfo objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pEndDateTime";
                    objInfo3.PDBType = "DateTime";
                    objInfo3.PValue = EndDateTime;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo3);

                    clsSqlParametersInfo objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pAllDay";
                    objInfo4.PDBType = "Bit";
                    objInfo4.PValue = IsAllDay;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo4);

                    clsSqlParametersInfo objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pRepeatType";
                    objInfo5.PDBType = "NVarChar";
                    objInfo5.PValue = RepeatType;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo5);

                   clsSqlParametersInfo objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pHostId";
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PValue = HostId;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo6);

                   clsSqlParametersInfo objInfo7 = new clsSqlParametersInfo();
                    objInfo7.Direction = "Input";
                    objInfo7.PName = "@pConferenceLocation";
                    objInfo7.PDBType = "NVarChar";
                    objInfo7.PValue = ConferenceLocation;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo7);

                    clsSqlParametersInfo objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pConferenceDetail";
                    objInfo8.PDBType = "NVarChar";
                    objInfo8.PValue = ConferenceDetail;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo8);

                    clsSqlParametersInfo objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pConferenceType";
                    objInfo9.PDBType = "NVarChar";
                    objInfo9.PValue = ConferenceType;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo9);

                    clsSqlParametersInfo objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Input";
                    objInfo10.PName = "@pConfPassword";
                    objInfo10.PDBType = "NVarChar";
                    objInfo10.PValue = ConfPassword;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo10);

                    //clsSqlParametersInfo objInfo11 = new clsSqlParametersInfo();
                    //objInfo11.Direction = "Input";
                    //objInfo11.PName = "@pCountry";
                    //objInfo11.PDBType = "NVarChar";
                    //objInfo11.PValue = Country;
                    ////objInfo.PSize = 200";
                    //lstParamInfo.Add(objInfo11);

                    clsSqlParametersInfo objInfo12 = new clsSqlParametersInfo();
                    objInfo12.Direction = "Input";
                    objInfo12.PName = "@pTimezone";
                    objInfo12.PDBType = "NVarChar";
                    objInfo12.PValue = Timezone;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo12);



                    clsSqlParametersInfo objInfo13 = new clsSqlParametersInfo();
                    objInfo13.Direction = "Input";
                    objInfo13.PName = "@pCreatedDate";
                    objInfo13.PDBType = "DateTime";
                    objInfo13.PValue = DateTime.Now;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo13);

                    clsSqlParametersInfo objInfo14 = new clsSqlParametersInfo();
                    objInfo14.Direction = "Input";
                    objInfo14.PName = "@pCreatedBy";
                    objInfo14.PDBType = "BigInt";
                    objInfo14.PValue = CreatedBy;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo14);

                    clsSqlParametersInfo objInfo15 = new clsSqlParametersInfo();
                    objInfo15.Direction = "Input";
                    objInfo15.PName = "@pModifiedDate";
                    objInfo15.PDBType = "DateTime";
                    objInfo15.PValue = DateTime.Now;
                    //objInf.PSize = 200";
                    lstParamInfo.Add(objInfo15);

                    clsSqlParametersInfo objInfo16 = new clsSqlParametersInfo();
                    objInfo16.Direction = "Input";
                    objInfo16.PName = "@pModifiedBy";
                    objInfo16.PDBType = "BigInt";
                    objInfo16.PValue = ModifiedBy;
                    //objInf.PSize = 200";
                    lstParamInfo.Add(objInfo16);

                   

                    clsSqlParametersInfo objInfo17 = new clsSqlParametersInfo();
                    objInfo17.Direction = "Input";
                    objInfo17.PName = "@pReminderType";
                    objInfo17.PDBType = "NVarChar";
                    objInfo17.PValue = ReminderType;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo17);

                    clsSqlParametersInfo objInfo18 = new clsSqlParametersInfo();
                    objInfo18.Direction = "Input";
                    objInfo18.PName = "@pConfResponse";
                    objInfo18.PDBType = "NVarChar";
                    objInfo18.PValue = ConfResponse;
                    //objInfo.PSize = 200";
                    lstParamInfo.Add(objInfo18);

                    clsDataContract.objParam = lstParamInfo;

                    int NewConfID = clsMailDBClient.chHttpMailDBService.svcExecuteReturnNonQuery("spAEtblConference", clsDataContract);

                    //int NewConfID = int.Parse(objInfo.PValue.ToString());
                    lstParamInfo = new List<clsSqlParametersInfo>();
                    clsDataContract = new clsSqlParameterContract();

                    objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PDBType = "BigInt";
                    objInfo.PValue = -1;
                    lstParamInfo.Add(objInfo);


                    objInfo1 = new clsSqlParametersInfo();
                    objInfo1.Direction = "Input";
                    objInfo1.PName = "@pConferenceID";
                    objInfo1.PDBType = "BigInt";
                    objInfo1.PValue = NewConfID;
                    lstParamInfo.Add(objInfo1);


                    objInfo2 = new clsSqlParametersInfo();
                    objInfo2.Direction = "Input";
                    objInfo2.PName = "@pConferenceType";
                    objInfo2.PDBType = "NVarChar";
                    objInfo2.PValue = ConferenceType;
                    lstParamInfo.Add(objInfo2);

                    objInfo3 = new clsSqlParametersInfo();
                    objInfo3.Direction = "Input";
                    objInfo3.PName = "@pReminderType";
                    objInfo3.PDBType = "NVarChar";
                    objInfo3.PValue = ReminderType;
                    lstParamInfo.Add(objInfo3);

                    objInfo4 = new clsSqlParametersInfo();
                    objInfo4.Direction = "Input";
                    objInfo4.PName = "@pTimeBeforeConf";
                    objInfo4.PDBType = "NVarChar";
                    objInfo4.PValue = TimeBeforeConf;
                    lstParamInfo.Add(objInfo4);

                    objInfo5 = new clsSqlParametersInfo();
                    objInfo5.Direction = "Input";
                    objInfo5.PName = "@pCreatedBy";
                    objInfo5.PDBType = "BigInt";
                    objInfo5.PValue = CreatedBy;
                    lstParamInfo.Add(objInfo5);

                    objInfo6 = new clsSqlParametersInfo();
                    objInfo6.Direction = "Input";
                    objInfo6.PName = "@pModifiedBy";
                    objInfo6.PDBType = "BigInt";
                    objInfo6.PValue = ModifiedBy;
                    lstParamInfo.Add(objInfo6);

                    objInfo8 = new clsSqlParametersInfo();
                    objInfo8.Direction = "Input";
                    objInfo8.PName = "@pCreatedDate";
                    objInfo8.PDBType = "DateTime";
                    objInfo8.PValue = DateTime.Now;
                    lstParamInfo.Add(objInfo8);

                    objInfo9 = new clsSqlParametersInfo();
                    objInfo9.Direction = "Input";
                    objInfo9.PName = "@pModifiedDate";
                    objInfo9.PDBType = "DateTime";
                    objInfo9.PValue = DateTime.Now;
                    lstParamInfo.Add(objInfo9);

                    objInfo10 = new clsSqlParametersInfo();
                    objInfo10.Direction = "Output";
                    objInfo10.PName = "@pReturnMaxId";
                    objInfo10.PDBType = "BigInt";
                    //objInfo10.PValue = ModifiedDate;
                    lstParamInfo.Add(objInfo10);

                    clsDataContract.objParam = lstParamInfo;

                    clsMailDBClient.chHttpMailDBService.svcExecuteReturnNonQuery("spAEtblReminder", clsDataContract);

                    return NewConfID;
                    //clsMailDBClient.chHttpMailDBService.svcExecuteReturnNonQuery
                              
                    
                    
                }
                else
                {

                    return (new Calender.DataAccess.ClsCalenderDataService(txn).Calender_Save(ref _ID, _ConfTitle, _StartDateTime, _EndDateTime, _IsAllDay, _RepeatType, _HostId, _ConferenceLocation, _ConferenceDetail, _ConferenceType,_Timezone, _ConfPassword, _CreatedDate, _CreatedBy, _ModifiedDate, _ModifiedBy, _ReminderType, _ConfResponse,_TimeBeforeConf,_GuestName,_Email));
                }
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "Save(IDbTransaction txn)", "ClsCalender.xaml.cs");
                return -1;
            }
        }
Esempio n. 8
0
        // Delete the user id and transaction(ID, txn)
        public static void Delete(int ID, IDbTransaction txn)
        {
            try
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithHttp)
                {
                    List<clsSqlParametersInfo> lstParamInfo = new List<clsSqlParametersInfo>();
                    clsSqlParameterContract clsDataContract = new clsSqlParameterContract();
                    
                    clsSqlParametersInfo objInfo = new clsSqlParametersInfo();
                    objInfo.Direction = "Input";
                    objInfo.PName = "@pID";
                    objInfo.PDBType = "BigInt";
                    objInfo.PValue = ID;
                    //objInfo.PSize = 200";
                   lstParamInfo.Add(objInfo);

                   clsDataContract.objParam = lstParamInfo;

                    clsMailDBClient.chHttpMailDBService. svcExecuteNonQuery("spDCalender",clsDataContract);

                    StringBuilder sb = new StringBuilder();
                    sb.AppendLine("calander Module.");
                    sb.AppendLine("Delete the UserID:" + ID.ToString());
                    sb.AppendLine("Delete the transaction:" + txn.ToString());
                    sb.Append(sb.ToString());
                    VMuktiAPI.ClsLogging.WriteToTresslog(sb);

                }
                else
                {
                    new Calender.DataAccess.ClsCalenderDataService(txn).Calender_Delete(ID);
                }
                
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "Delete(int ID, IDbTransaction txn)", "ClsCalender.xaml.cs");
            }
        }
        void clsMailDBService_EntsvcExecuteNonQuery(string spName, clsSqlParameterContract objSParam)
        {
            try
            {
                SqlConnection conn = new SqlConnection(VMuktiInfo.MainConnectionString);
                conn.Open();
                SqlCommand cmd = new SqlCommand();
                cmd.CommandText = spName;
                cmd.CommandType = CommandType.StoredProcedure;
                cmd.Connection = conn;
                if (objSParam != null && objSParam.objParam != null)
                {
                    for (int paramCnt = 0; paramCnt < objSParam.objParam.Count; paramCnt++)
                    {
                        SqlParameter sp = new SqlParameter();
                        sp.ParameterName = (string)objSParam.objParam[paramCnt].PName;
                        if (sp.Size != -1)
                        {
                            sp.Size = (int)objSParam.objParam[paramCnt].PSize;
                        }
                        sp.Value = (object)objSParam.objParam[paramCnt].PValue;

                        string direction = (string)objSParam.objParam[paramCnt].Direction;
                        string dbType = (string)objSParam.objParam[paramCnt].PDBType;

                        //Enum.GetNames(typeof(SqlDbType))

                        switch (direction)
                        {
                            case "Input":
                                {
                                    sp.Direction = ParameterDirection.Input;
                                    break;
                                }
                            case "InputOutput":
                                {
                                    sp.Direction = ParameterDirection.InputOutput;
                                    break;
                                }
                            case "Output":
                                {
                                    sp.Direction = ParameterDirection.Output;
                                    break;
                                }
                            case "ReturnValue":
                                {
                                    sp.Direction = ParameterDirection.ReturnValue;
                                    break;
                                }
                            default:
                                {
                                    break;
                                }

                        }

                        switch (dbType)
                        {
                            case "VarChar":
                                {
                                    sp.SqlDbType = SqlDbType.VarChar;
                                    break;
                                }
                            case "NVarChar":
                                {
                                    sp.SqlDbType = SqlDbType.NVarChar;
                                    
                                    break;
                                }
                            case "Char":
                                {
                                    sp.SqlDbType = SqlDbType.Char;

                                    break;
                                }
                            case "NChar":
                                {
                                    sp.SqlDbType = SqlDbType.NChar;

                                    break;
                                }
                            case "Text":
                                {
                                    sp.SqlDbType = SqlDbType.Text;

                                    break;
                                }
                            case "DateTime":
                                {
                                    sp.SqlDbType = SqlDbType.DateTime;

                                    break;
                                }
                            case "Int":
                                {
                                    sp.SqlDbType = SqlDbType.Int;

                                    break;
                                }
                            case "UniqueIdentifier":
                                {
                                    sp.SqlDbType = SqlDbType.UniqueIdentifier;

                                    break;
                                }

                            case "Bit":
                                {
                                    sp.SqlDbType = SqlDbType.Bit;

                                    break;
                                }

                            case "Float":
                                {
                                    sp.SqlDbType = SqlDbType.Float;

                                    break;
                                }

                            case "Decimal":
                                {
                                    sp.SqlDbType = SqlDbType.Decimal;

                                    break;
                                }
                            case "BigInt":
                                {
                                    sp.SqlDbType = SqlDbType.BigInt;

                                    break;
                                }
                            default:
                                {
                                    break;
                                }

                        }
                        cmd.Parameters.Add(sp);


                    }

                }


                cmd.ExecuteNonQuery();
                conn.Close();
                conn.Dispose();
                cmd.Dispose();
            }
            catch (Exception exp)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(exp, "clsMailDBService_EntsvcExecuteNonQuery()", "clsMailDBService.xaml.cs");
            }
        }
 public int svcExecuteReturnNonQuery(string spName, clsSqlParameterContract objSParam)
 {
     try
     {
     if(EntsvcExecuteReturnNonQuery!=null)
     {
         return (EntsvcExecuteReturnNonQuery(spName, objSParam));
     }
     else
     {
         return -1;
     }
 }
     catch (Exception ex)
     {
         ex.Data.Add("My Key", "svcExecuteReturnNonQuery()--:--clsHttpAudio.cs--:--" + ex.Message + " :--:--");
         //ClsException.LogError(ex);
         //ClsException.WriteToErrorLogFile(ex);
         System.Text.StringBuilder sb = new StringBuilder();
         sb.AppendLine(ex.Message);
         sb.AppendLine();
         sb.AppendLine("StackTrace : " + ex.StackTrace);
         sb.AppendLine();
         sb.AppendLine("Location : " + ex.Data["My Key"].ToString());
         sb.AppendLine();
         sb1 = CreateTressInfo();
         sb.Append(sb1.ToString());
         VMuktiAPI.ClsLogging.WriteToTresslog(sb);
         return 0;
     }
 }