コード例 #1
0
        public static ChangeNominee DataRowToObject(DataRow dr)
        {
            ChangeNominee TheChangeNominee = new ChangeNominee();

            TheChangeNominee.CustomerNomineeID            = int.Parse(dr["CustomerNomineeID"].ToString());
            TheChangeNominee.CustomerAccountID            = int.Parse(dr["CustomerAccountID"].ToString());
            TheChangeNominee.NomineeName                  = dr["NomineeName"].ToString();
            TheChangeNominee.Nominee_Permanent_TownOrCity = dr["Nominee_Permanent_TownOrCity"].ToString();
            TheChangeNominee.Nominee_Permanent_Landmark   = dr["Nominee_Permanent_Landmark"].ToString();
            TheChangeNominee.Nominee_Permanent_PinCode    = dr["Nominee_Permanent_PinCode"].ToString();
            TheChangeNominee.Nominee_Permanent_DistrictID = int.Parse(dr["Nominee_Permanent_DistrictID"].ToString());
            TheChangeNominee.NomineeRelationship          = dr["NomineeRelationship"].ToString();
            TheChangeNominee.NomineeAge = int.Parse(dr["NomineeAge"].ToString());

            return(TheChangeNominee);
        }
コード例 #2
0
        public int InsertNomineeDetails(ChangeNominee theNominee)
        {
            int ReturnValue = 0;

            using (SqlCommand InsertCommand = new SqlCommand())
            {
                InsertCommand.CommandType = CommandType.StoredProcedure;
                InsertCommand.Parameters.Add(GetParameter("@ReturnValue", SqlDbType.Int, ReturnValue)).Direction = ParameterDirection.Output;
                InsertCommand.Parameters.Add(GetParameter("@CustomerAccountID", SqlDbType.Int, theNominee.CustomerAccountID));
                InsertCommand.Parameters.Add(GetParameter("@NomineeName", SqlDbType.VarChar, theNominee.NomineeName));
                InsertCommand.Parameters.Add(GetParameter("@Nominee_Permanent_TownOrCity", SqlDbType.VarChar, theNominee.Nominee_Permanent_TownOrCity));
                InsertCommand.Parameters.Add(GetParameter("@Nominee_Permanent_Landmark", SqlDbType.VarChar, theNominee.Nominee_Permanent_Landmark));
                InsertCommand.Parameters.Add(GetParameter("@Nominee_Permanent_PinCode", SqlDbType.VarChar, theNominee.Nominee_Permanent_PinCode));
                InsertCommand.Parameters.Add(GetParameter("@Nominee_Permanent_DistrictID", SqlDbType.Int, theNominee.Nominee_Permanent_DistrictID));
                InsertCommand.Parameters.Add(GetParameter("@NomineeRelationship", SqlDbType.VarChar, theNominee.NomineeRelationship));
                InsertCommand.Parameters.Add(GetParameter("@NomineeAge", SqlDbType.Int, theNominee.NomineeAge));
                InsertCommand.Parameters.Add(GetParameter("@AddedBy", SqlDbType.Int, Micro.Commons.Connection.LoggedOnUser.UserID));
                InsertCommand.CommandText = "pCRM_CustomerNominees_Insert";
                ExecuteStoredProcedure(InsertCommand);
                ReturnValue = int.Parse(InsertCommand.Parameters[0].Value.ToString());
                return(ReturnValue);
            }
        }
コード例 #3
0
 public int InsertNomineeDetails(ChangeNominee theNominee)
 {
     return(ChangeNomineeIntegration.InsertNomineeDetails(theNominee));
 }
コード例 #4
0
 public static int InsertNomineeDetails(ChangeNominee theNominee)
 {
     return(ChangeNomineeDataAccess.GetInstance.InsertNomineeDetails(theNominee));
 }