/// <summary> /// Save Contact Group /// </summary> /// <param name="objexegrp"></param> /// <returns>True/False</returns> public bool SaveExecutiveGroup(eSunSpeedDomain.ExecutiveModel objexegrp) { try { string Query = string.Empty; DBParameterCollection paramCollection = new DBParameterCollection(); paramCollection.Add(new DBParameter("@Name", objexegrp.GroupName)); paramCollection.Add(new DBParameter("@Alias", objexegrp.AliasName)); paramCollection.Add(new DBParameter("@PrintName", objexegrp.PrintName)); paramCollection.Add(new DBParameter("@HandlesCallType", objexegrp.Handlescalltype)); paramCollection.Add(new DBParameter("@Area", objexegrp.Area)); paramCollection.Add(new DBParameter("@Address", objexegrp.Address)); paramCollection.Add(new DBParameter("@Address1", objexegrp.Address1)); paramCollection.Add(new DBParameter("@Address2", objexegrp.Address2)); paramCollection.Add(new DBParameter("@Address3", objexegrp.Address3)); paramCollection.Add(new DBParameter("@Telephone", objexegrp.Telephone)); paramCollection.Add(new DBParameter("@MobileNo", objexegrp.MobileNo)); paramCollection.Add(new DBParameter("@Email", objexegrp.Email)); Query = "INSERT INTO executivegroup(`Name`,`Alias`,`PrintName`,`HandlesCallType`,`Area`,`Address`,`Address1`,`Address2`,`Address3`,`Telephone`,`MobileNo`,`E-Mail`,`CreatedBy`) VALUES (@Name,@Alias,@PrintName,@HandlesCallType,@Area,@Address,@Address1,@Address2,@Address3,@Telephone,@MobileNo,@Email,@CreatedBy)"; return(_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0); } catch (Exception ex) { throw ex; } }
/// <summary> /// Save Account Group /// </summary> /// <param name="objAccountGrp"></param> /// <returns>True/False</returns> public bool SaveExeGroup(eSunSpeedDomain.ExecutiveModel objexe) { string Query = string.Empty; DBParameterCollection paramCollection = new DBParameterCollection(); paramCollection.Add(new DBParameter("@Name", objexe.Name)); paramCollection.Add(new DBParameter("@Alias", objexe.Alias)); paramCollection.Add(new DBParameter("@PrintName", objexe.PrintName)); paramCollection.Add(new DBParameter("@Handlescalltype", objexe.HandlescallType)); paramCollection.Add(new DBParameter("@Area", objexe.Area)); paramCollection.Add(new DBParameter("@Address", objexe.Address)); paramCollection.Add(new DBParameter("@Address1", objexe.Address1)); paramCollection.Add(new DBParameter("@Address2", objexe.Address2)); paramCollection.Add(new DBParameter("@Address3", objexe.Address3)); paramCollection.Add(new DBParameter("@TelephoneNo", objexe.TelephoneNumber)); paramCollection.Add(new DBParameter("@MobileNo", objexe.MobileNumber)); Query = "INSERT INTO Executivegroup (`Name`,`Alias`,`PrintName`,`Handlescalltype`,`Area`,`Address`,`Address1`,`Address2`,`Address3`,`Telephone`,`MobileNo`)VALUES (@Name,@Alias,@PrintName,@Handlescalltype,@Area,@Address,@Address1,@Address2,@Address3,@TelephoneNo,@MobileNo)"; return(_dbHelper.ExecuteNonQuery(Query, paramCollection) > 0); }