Example #1
0
        public static bool UpdateHduData(string Address, string State, string City, int PinCode, int Contactno, int Fax, string RegNo)
        {
            DbCommand dbComm = BaseDb.CreateCommand();
            // dbComm.CommandText = "UpdateHduDetails"; //name of stored procedure

            DbParameter dbparam = dbComm.CreateParameter();

            dbparam.ParameterName = "@Address";
            dbparam.Value         = Address;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@State";
            dbparam.Value         = State;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@City";
            dbparam.Value         = City;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@PinCode";
            dbparam.Value         = PinCode;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@contactNo";
            dbparam.Value         = Contactno;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);



            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Fax";
            dbparam.Value         = Fax;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegNo";
            dbparam.Value         = RegNo;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);



            int result = -1;

            try
            {
                result = BaseDb.ExecuteNonQuery(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            finally
            {
            }
            return(result != -1);
        }
Example #2
0
        public static bool AddHduInfo(string MemberCode, string Organization, string Name, string Address, String State, String City, int Pincode, int ContactNo, int MobileNo, string EmailId, int Fax, string RegNo, string Sector, string Objective, string Purpose, string Nature, string Frequency, DateTime RegDate, int RegFee, DateTime RenewDt, int RenFee, DateTime MemberExpDt, string CreatedBy, DateTime CreatedDate, string UpdatedBy, DateTime UpdatedDate)
        {
            DbCommand dbComm = BaseDb.CreateCommand();

            dbComm.CommandText = "AddHduInformation"; //name of stored procedure

            DbParameter dbparam = dbComm.CreateParameter();

            dbparam.ParameterName = "@MemberCode";
            dbparam.Value         = MemberCode;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Organization";
            dbparam.Value         = Organization;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Name";
            dbparam.Value         = Name;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Address";
            dbparam.Value         = Address;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@State";
            dbparam.Value         = State;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@City";
            dbparam.Value         = City;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@PinCode";
            dbparam.Value         = Pincode;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@ContactNo";
            dbparam.Value         = ContactNo;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@MobileNo";
            dbparam.Value         = MobileNo;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@EmailId";
            dbparam.Value         = EmailId;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Fax";
            dbparam.Value         = Fax;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegNo";
            dbparam.Value         = RegNo;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Sector";
            dbparam.Value         = Sector;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Objective";
            dbparam.Value         = Objective;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Purpose";
            dbparam.Value         = Purpose;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Nature";
            dbparam.Value         = Nature;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Frequency";
            dbparam.Value         = Frequency;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegDate";
            dbparam.Value         = RegDate;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegFee";
            dbparam.Value         = RegFee;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RenewDt";
            dbparam.Value         = RenewDt;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RenFee";
            dbparam.Value         = RenFee;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@MemberExpDt";
            dbparam.Value         = MemberExpDt;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            //dbparam = dbComm.CreateParameter();
            //dbparam.ParameterName = "@EntrDt";
            //dbparam.Value = EntryDate;
            //dbparam.DbType = DbType.Date;
            //dbparam.Direction = ParameterDirection.Input;
            //dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@CreatedBy";
            dbparam.Value         = CreatedBy;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@CreatedDt";
            dbparam.Value         = CreatedDate;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@UpdatedBy";
            dbparam.Value         = UpdatedBy;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@UpdatedDt";
            dbparam.Value         = UpdatedDate;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);



            int result = -1;

            try
            {
                result = BaseDb.ExecuteNonQuery(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            finally
            {
            }
            return(result != -1);
        }
Example #3
0
        //Update Member Details



        public static bool UpdateMemberData(int MemberId, DateTime RegDate, int RegFee, DateTime RenewDt, int RenFee, DateTime MemExpDate, string RegNo)
        {
            DbCommand dbComm = BaseDb.CreateCommand();

            dbComm.CommandText = "UpdateMember"; //name of stored procedure

            DbParameter dbparam = dbComm.CreateParameter();

            dbparam.ParameterName = "@RegDate";
            dbparam.Value         = RegDate;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegFee";
            dbparam.Value         = RegFee;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RenewDt";
            dbparam.Value         = RenewDt;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@MemberExpDt";
            dbparam.Value         = MemExpDate;
            dbparam.DbType        = DbType.Date;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RenewFee";
            dbparam.Value         = RenFee;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);


            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@RegNo";
            dbparam.Value         = RegNo;
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "Member_Id";
            dbparam.Value         = MemberId;
            dbparam.DbType        = DbType.Int32;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);

            dbparam = dbComm.CreateParameter();
            dbparam.ParameterName = "@Status";
            dbparam.Value         = "A";
            dbparam.DbType        = DbType.String;
            dbparam.Direction     = ParameterDirection.Input;
            dbComm.Parameters.Add(dbparam);



            int result = -1;

            try
            {
                result = BaseDb.ExecuteNonQuery(dbComm);
            }
            catch (Exception exc)
            {
                throw exc;
            }
            finally
            {
            }
            return(result != -1);
        }